DDC-1423: Improving ReadOnly annotation by caching query results #1784

Closed
opened 2026-01-22 13:25:53 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Oct 16, 2011).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user jsilvestre:

We should be able to tell Doctrine that we want the result of requests on ReadOnly marked Entities to be cached.

For instance:
$person->getMoodInformation();
$person->getCityInformation();

CityInformation are not likely to change so it would make sense to cache it and retrieve only MoodInformation (by using an annotation on the concerned Entity).

What would be even better is to tag which properies we want to hydrate from database and which properties we want to hydrate from cache.

Originally created by @doctrinebot on GitHub (Oct 16, 2011). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user jsilvestre: We should be able to tell Doctrine that we want the result of requests on ReadOnly marked Entities to be cached. For instance: $person->getMoodInformation(); $person->getCityInformation(); CityInformation are not likely to change so it would make sense to cache it and retrieve only MoodInformation (by using an annotation on the concerned Entity). What would be even better is to tag which properies we want to hydrate from database and which properties we want to hydrate from cache.
admin added the ImprovementInvalid labels 2026-01-22 13:25:53 +01:00
admin closed this issue 2026-01-22 13:25:53 +01:00
Author
Owner

@malukenho commented on GitHub (Jan 5, 2017):

@Ocramius I guess it's not valid anymore. (We have now second level cache if performance is a issue)

@malukenho commented on GitHub (Jan 5, 2017): @Ocramius I guess it's not valid anymore. (We have now second level cache if performance is a issue)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1784