mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Let Entity use cache #5762
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @michsk on GitHub (Nov 6, 2017).
Can my Entity use the (second level cache) cache in some way? I have a very expensive set of functions which calculate the "amount spent" on a object. Now i would ik to cache this amount spent and only add and subtract options added or removed.
Would it be possible to do this trough the entity itself? or will i have to create a service for this?
@Ocramius commented on GitHub (Nov 6, 2017):
It would be best to delegate caching to a service, rather than to the ORM/Entity.
@michsk commented on GitHub (Nov 7, 2017):
thank you