Package org.opencms.db
Class CmsCacheKey
- java.lang.Object
-
- org.opencms.db.CmsCacheKey
-
- All Implemented Interfaces:
I_CmsCacheKey
public class CmsCacheKey extends java.lang.Object implements I_CmsCacheKey
Generates the cache keys for the user and permission caches.- Since:
- 6.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCACHE_KEY_SUBALLCache key for a list of sub-resources (files and folders) of a folder.static java.lang.StringCACHE_KEY_SUBFILESCache key for a list of sub-files of a folder.static java.lang.StringCACHE_KEY_SUBFOLDERSCache key for a list of sub-folders of a folder.
-
Constructor Summary
Constructors Constructor Description CmsCacheKey()Constructor to create a new instance of CmsCacheKey.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCacheKeyForGroupUsers(java.lang.String prefix, CmsDbContext context, CmsGroup group)Returns the cache key for the group users cache.java.lang.StringgetCacheKeyForUserGroups(java.lang.String prefix, CmsDbContext context, CmsUser user)Returns the cache key for the user groups cache.java.lang.StringgetCacheKeyForUserPermissions(java.lang.String prefix, CmsDbContext context, CmsResource resource, CmsPermissionSet requiredPermissions)Returns the cache key for the permission cache.
-
-
-
Field Detail
-
CACHE_KEY_SUBALL
public static final java.lang.String CACHE_KEY_SUBALL
Cache key for a list of sub-resources (files and folders) of a folder.- See Also:
- Constant Field Values
-
CACHE_KEY_SUBFILES
public static final java.lang.String CACHE_KEY_SUBFILES
Cache key for a list of sub-files of a folder.- See Also:
- Constant Field Values
-
CACHE_KEY_SUBFOLDERS
public static final java.lang.String CACHE_KEY_SUBFOLDERS
Cache key for a list of sub-folders of a folder.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsCacheKey
public CmsCacheKey()
Constructor to create a new instance of CmsCacheKey.
-
-
Method Detail
-
getCacheKeyForGroupUsers
public java.lang.String getCacheKeyForGroupUsers(java.lang.String prefix, CmsDbContext context, CmsGroup group)
Description copied from interface:I_CmsCacheKeyReturns the cache key for the group users cache.- Specified by:
getCacheKeyForGroupUsersin interfaceI_CmsCacheKey- Parameters:
prefix- to distinguish keys additionallycontext- the contextgroup- the group- Returns:
- a cache key that is unique for the set of parameters
- See Also:
I_CmsCacheKey.getCacheKeyForGroupUsers(java.lang.String, org.opencms.db.CmsDbContext, org.opencms.file.CmsGroup)
-
getCacheKeyForUserGroups
public java.lang.String getCacheKeyForUserGroups(java.lang.String prefix, CmsDbContext context, CmsUser user)
Description copied from interface:I_CmsCacheKeyReturns the cache key for the user groups cache.- Specified by:
getCacheKeyForUserGroupsin interfaceI_CmsCacheKey- Parameters:
prefix- to distinguish keys additionallycontext- the contextuser- the user- Returns:
- a cache key that is unique for the set of parameters
- See Also:
I_CmsCacheKey.getCacheKeyForUserGroups(java.lang.String, org.opencms.db.CmsDbContext, org.opencms.file.CmsUser)
-
getCacheKeyForUserPermissions
public java.lang.String getCacheKeyForUserPermissions(java.lang.String prefix, CmsDbContext context, CmsResource resource, CmsPermissionSet requiredPermissions)
Description copied from interface:I_CmsCacheKeyReturns the cache key for the permission cache.- Specified by:
getCacheKeyForUserPermissionsin interfaceI_CmsCacheKey- Parameters:
prefix- to distinguish keys additionallycontext- the contextresource- the resourcerequiredPermissions- the permissions to check- Returns:
- a cache key that is unique for the set of parameters
- See Also:
I_CmsCacheKey.getCacheKeyForUserPermissions(java.lang.String, org.opencms.db.CmsDbContext, org.opencms.file.CmsResource, org.opencms.security.CmsPermissionSet)
-
-