This commit is contained in:
2025-10-25 20:11:21 +02:00
commit fd37421245
700 changed files with 211892 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
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.