mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2716: [GH-808] Second level cache #3401
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 @doctrinebot on GitHub (Oct 1, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of FabioBatSilva:
Url: https://github.com/doctrine/doctrine2/pull/808
Message:
Hi guys,
I believe, We are coming to an end.. ;)
https://github.com/doctrine/doctrine2/pull/580, rebase and reopened to make easier to final review.
Cache strategies
classes / interfaces
** Region* :
Defines a contract for accessing a entity/collection data cache. (Doesn���t employ any locks)
** ConcurrentRegion* :
Defines contract for concurrently managed data region. (Locks the data before update/delete.)
* CacheKey / EntityCacheKey / CollectionCacheKey/ QueryCacheKey:
Defines entity / collection key to be stored in the cache region.
* EntityHidrator / CollectionHidrator
Build cache entries and rebuild entities/colection from cache
* CacheFactory
Factory from second level cache components
Collection Caching
The most common use case is to cache entities. But we can also cache relationships.
A ���collection cache��� caches the primary keys of entities that are members of a collection (OneToMany/ManyToMany).
and each element will be cached into its region.
Only identifiers will be cached for collection. When a collection is read from the second level cache it will create proxies based on the cached identifiers, if the application needs to access an element, Doctrine will go to the cache to load the element data.
Query Cache
The query cache does not cache the state of the actual entities in the result set;
it caches only identifier values for an individual query.
So the query cache should always be used in conjunction with the second-level cache.
OPERATIONS
INSERT :
UPDATE :
DELETE :
USAGE :
@doctrinebot commented on GitHub (Dec 16, 2013):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-808] was closed:
https://github.com/doctrine/doctrine2/pull/808
@doctrinebot commented on GitHub (Dec 16, 2013):
Issue was closed with resolution "Fixed"