Let Entity use cache #5762

Closed
opened 2026-01-22 15:17:01 +01:00 by admin · 2 comments
Owner

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?

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?
admin closed this issue 2026-01-22 15:17:01 +01:00
Author
Owner

@Ocramius commented on GitHub (Nov 6, 2017):

It would be best to delegate caching to a service, rather than to the ORM/Entity.

@Ocramius commented on GitHub (Nov 6, 2017): It would be best to delegate caching to a service, rather than to the ORM/Entity.
Author
Owner

@michsk commented on GitHub (Nov 7, 2017):

thank you

@michsk commented on GitHub (Nov 7, 2017): thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5762