Files
2025-10-25 20:11:21 +02:00

12 lines
737 B
Markdown

A cache tied to the model, is automatically clear when saving. This allows for caching without much thinking about cache invalidation.
## Usage
Call the model cache method on the model to access it
## Todo
- [x] Create a class which implements the cache methods and tags all caches. ✅ 2023-10-28
- [x] Create a trait which allows for access to this cache and clears is on saved. ✅ 2023-10-28
- [x] Add readme about usage. ✅ 2023-11-05
- [ ] Allow for the adding of other tags, so the cache can store values dependent on multiple models.
- [ ] Make the cache macroable so complex callbacks and tag configurations can defined just once. Add a cache()->toArray() example.
- [ ] Add a class factory as a place to store these macros.