Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The future: clever cache updates? #2

Open
Ali1 opened this issue Mar 30, 2014 · 1 comment
Open

The future: clever cache updates? #2

Ali1 opened this issue Mar 30, 2014 · 1 comment

Comments

@Ali1
Copy link
Contributor

Ali1 commented Mar 30, 2014

Thanks for repoing and improving this excellent Behaviour. It would be great if it was a bit smarter. Most of the aggregates can be computed beforeSave and beforeDelete just by knowing about the item that has changed and the old aggregate value that has already been calculated previously - saving a potentially heavy database query. Obviously you cannot always compute the new aggregate but in a majority of times it would.

Once this is done, future features could be that it could rely on the actual Cache to store aggregate values rather than in the database. Wow.

@Indemnity83
Copy link
Contributor

The problem with doing any cache calculation exclusively beforeSave or beforeDelete is what do you do it the save or delete fails?

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

No branches or pull requests

3 participants