Package org.opencms.db
Class CmsDriverManager.ResourceOUCacheKey
java.lang.Object
org.opencms.db.CmsDriverManager.ResourceOUCacheKey
- Enclosing class:
- CmsDriverManager
Special key class for caching the resource OU data with a Guava LoadingCache.
In principle, the actual cache key is just the current project, but because of how cache loaders work, the key must contain everything that varies between calls and is required to load the value. So we also store the DB context for use by the cache loader. The project (offline/online) must still be stored, because the DB context gets invalidated eventually, i.e. its project id gets nulled.
-
Constructor Summary
ConstructorDescriptionResourceOUCacheKey
(CmsDriverManager driverManager, CmsDbContext dbc) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the stored DB context.Gets the current driver manager.int
hashCode()
-
Constructor Details
-
ResourceOUCacheKey
Creates a new instance.- Parameters:
driverManager
- the driver manager to usedbc
- the current DB context
-
-
Method Details
-
equals
-
getDbContext
Gets the stored DB context.Note that the DB contex returned by this may have been invalidated!
- Returns:
- the stored DB context
-
getDriverManager
Gets the current driver manager.- Returns:
- the driver manager to use
-
hashCode
-