Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Very good but caching system is not flexible enough #10

Closed
rjsworking opened this issue Jun 20, 2016 · 3 comments
Closed

Very good but caching system is not flexible enough #10

rjsworking opened this issue Jun 20, 2016 · 3 comments
Assignees
Labels

Comments

@rjsworking
Copy link
Contributor

rjsworking commented Jun 20, 2016

Hi. Thank you for this nice package. Had tried many 'repository' packages but none of them have a flexible/granular caching system.
It's ok to have a default storage and lifetime but that's not enough.

In a app I have different queries on the same repository that needs different lifetimes. The least accessed data can have a longer or infinite lifetime and can be stored in files. This cached data doesn't need to be deleted/regenerated every time the model changes.
Ex: Average product price data generated twice a month.

Ex: Product suplier list doesn't change often. This could be cached in memcached. The LRU algo from memcached doesn't cause performance issues if the this data is deleted from cache.

The most accessed data must be cached in redis with shorter lifetime.
Ex: Prices changes every week. Stock changes every day. Product descriptions are accessed every time.

A good caching system would allow to select the storage/lifetime for a specific query. If none is selected then the default is used.

Keep up the good work.

Cheers

@Omranic
Copy link
Member

Omranic commented Jun 20, 2016

Hello Dear @rsdev000,
Thank you for this nice proposal, I can see the use case of more flexible and granular caching.
Currently I guarantee you to add lifetime support for every function call. That would be nice and won't add much overall complexity. Let me check the possibility of adding different driver support per method and get back again to you soon 👍
Regards, Omran

@Omranic
Copy link
Member

Omranic commented Jun 20, 2016

Good news, both features are coming in next update 👍 Stay tuned 😉

  • Per repository cache driver
  • Per repository cache lifetime

@Omranic
Copy link
Member

Omranic commented Jun 21, 2016

@rsdev000 Implemented, released. Check & feedback please 😉 c211553

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants