task(Index Operations were not using a singleton to keep cache) Refs:#34938 #35104
task(Index Operations were not using a singleton to keep cache) Refs:#34938 #35104fabrizzio-dotCMS merged 1 commit intomainfrom
Conversation
|
Claude finished @fabrizzio-dotCMS's task in 55s —— View job Rollback Safety Analysis
Result: ✅ Safe to RollbackThe label AI: Safe To Rollback has been applied. Changes analyzed:
Category-by-category verdict:
This is a pure in-memory cache refactoring. Rolling back to N-1 would simply revert to creating a fresh |
|
Claude finished @fabrizzio-dotCMS's task in 1m 11s —— View job PR Review
Summary: Clean, minimal fix. The core problem — Issues found: 1. Indentation inconsistency in The new entries in the // existing entries use tabs:
ESQueryCache("ESQueryCache"),
// new entry uses spaces:
OSQueryCache("OSQueryCache"),2.
3.
Overall: The fix is correct and the approach matches existing patterns ( |
Summary
Fixes a bug where
ContentFactoryIndexOperationsOSwas creating a newOSQueryCacheinstance on every instantiation instead of using the shared singleton managed byCacheLocator. This caused the OS query cache to be bypassed in production, defeating its purpose.Changes
Bug fix
ContentFactoryIndexOperationsOS— constructor now fetches the cache viaCacheLocator.getOSQueryCache()instead ofnew OSQueryCache(), ensuring all instances share the same cacheCache infrastructure
CacheLocator— addedgetOSQueryCache()accessor and registeredOSQueryCachein theCacheIndexenum, mirroring the existingESQueryCachepatternCleanup
CacheUtil.java— deleted dead utility class (Moveh2dbDir) that referencedcontentletIndexAPI.timestampFormatterand was unusedTesting
No new tests added. The fix follows the same pattern as
ESQueryCachewhich is already in use. To verify:CacheLocator.getOSQueryCache()returns the same instance across callsBreaking Changes
None.
This PR fixes: #34938
This PR fixes: #34938