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

U4-7558 Fix GetAll repository level caching for repositories that return a query result based on the result of GetAll #1002

Merged
merged 13 commits into from Jan 11, 2016

Conversation

Shazwazza
Copy link
Contributor

No description provided.

…eAsCollection, changes the default repository cache to be an isolated cache (instead of part of the single main dictionary cache), adds the logic for the cache option GetAllCacheAsCollection to RepositoryBase, updates Language and Domain repositories to use GetAllCacheAsCollection, updates RepositoryFactory to be the one responsible for injecting a DeepCloneRuntimeCacheProvider and to use a single _noCache instance.
…loneableList + tests. Updates RepositoryBase to use DeepCloneableList when GetAllCacheAsCollection is used (so that all entries that get cached are deep cloned into and out-of the cache). Adds test for DeepCloneRuntimeCacheProvider for dealing with this list type.
…ere required, refactors how IsolatedRuntimeCache is exposed on the CacheHelper, ensures that IsolatedRuntimeCache is used in all repositories instead of the global RuntimeCache, changes all obsolete usages of CacheHelper to the non obsolete equivalent, obsoletes many of the cache keys, obsoletes a couple cache refreshers that aren't used anymore in 7.3, simplifies CacheHelper with regards to it's 'disabled' cache state.
… - to basically disable it since there could be tons of these and currently an IDictionaryItem is a massive entity (need to fix that)
…single key even if there were ids specified which is wrong. Updates TemplateRepository to use a single GetAll query as its base source and it uses the GetAllCacheAsCollection option, also massively simplifies its GetDescendants methods, obsoletes some unused code,
…and return a single result by ID based on the cache of GetAll
…ed ILanguage entity is not cached nor cloned. This will save on lots of memory and cloning cycles especially if there are quire a few dictioanry items. Unfortunatley to achieve this requires a not so pretty hack where we need to assign an internal callback to the model so it knows how to retrieve the language when it needs it. In v8, the ILanguage entity will not be attached at all. This also fixes a cache refresher issue for when a language is deleted -> all dictionary cache must be removed. This commit also changes a method name: ClearAllIsolatedCacheByRepositoryEntityType
@zpqrtbnk
Copy link
Contributor

OK, fail to break it...

zpqrtbnk added a commit that referenced this pull request Jan 11, 2016
U4-7558 Fix GetAll repository level caching for repositories that return a query result based on the result of GetAll
@zpqrtbnk zpqrtbnk merged commit 20f5560 into dev-v7 Jan 11, 2016
@Shazwazza Shazwazza deleted the temp-U4-7558-2 branch January 11, 2016 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants