You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add CacheNullValues option to RepositoryCachePolicy
* Cache null values in DictionaryByKeyRepository
* Fixed issue with nullable reference.
* Updated logic for caching of null values.
* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs
Co-authored-by: Sven Geusens <[email protected]>
* Made the NullValueRepresentation overwritable in a generic manner
* Improve generic NullValueCachePolicyResolver
* Revert Commits and clarify logic with comment
This reverts commit 8befb43 "Improve generic NullValueCachePolicyResolver"
Also reverts 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner
And 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner
* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs
---------
Co-authored-by: Andy Butland <[email protected]>
Co-authored-by: Sven Geusens <[email protected]>
Co-authored-by: Sven Geusens <[email protected]>
// if found in cache then return else fetch and cache
133
-
if(fromCache!=null)
136
+
// If found in cache then return immediately.
137
+
if(fromCacheis notnull)
134
138
{
135
139
returnfromCache;
136
140
}
137
141
142
+
// Because TEntity can never be a string, we will never be in a position where the proxy value collides withs a real value.
143
+
// Therefore this point can only be reached if there is a proxy null value => becomes null when cast to TEntity above OR the item simply does not exist.
0 commit comments