Laravel Community Tools by Tighten

Category "Cache" tricks

21 tricks
Combining Model Observers and Cache Tags for very simple but elegant automatic cache flushing on Eloquent Model updates. Can handle both a Model and its Relations easily!
nik-418 12 years ago 30514
Forget cache upon model events or custom events
bwsewell 12 years ago 18579
This is specific to using Redis for caching. You can group your keys in sections to allow for easily clearing the cache on just a section of data. Couple notes: 1. You have to have 'cluster' set to false in app/config/database.php under the 'redis' key. 2. Remember to pass through variables into the closure with 'use'. 3. Have fun!
gerob 12 years ago 14441