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

737 B

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

  • Create a class which implements the cache methods and tags all caches. 2023-10-28
  • Create a trait which allows for access to this cache and clears is on saved. 2023-10-28
  • 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.