UserFrosting icon indicating copy to clipboard operation
UserFrosting copied to clipboard

Refactor cache system

Open lcharette opened this issue 7 years ago • 2 comments

The current UF cache package is overly complicated for nothing and inconsistent. For example, we create a new RedisStore, but have to call getInstance() to actually get a RedisStore.

Instead of creating singleton and fake app to create the RedisManager, it should probably be easier to directly implement our own CacheManager instead so we don't have to deal with Laravel app instance. Instead of defining RedisManager in $app it could probably be done in CacheManager directly.


TODO

  • [ ] Refactor cache package with our own CacheManager
  • [ ] Allows for multiple cache store to be used from the cache service
  • [x] Add a cache Facade
  • [ ] Add array store to disable caching

lcharette avatar Jan 05 '18 16:01 lcharette

Also while the cache service provides one cache store at a time, it could be useful allow for multiple cache store to be used.

Incidentally, the clear-cache Bakery command could also accept more options.

lcharette avatar Jan 05 '18 17:01 lcharette

...and it would require a way to globally disable cache (aka enable the arraystore)

lcharette avatar Jan 06 '18 02:01 lcharette