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.String
CACHE_KEY_SUBALL
Cache key for a list of sub-resources (files and folders) of a folder.static java.lang.String
CACHE_KEY_SUBFILES
Cache key for a list of sub-files of a folder.static java.lang.String
CACHE_KEY_SUBFOLDERS
Cache 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.String
getCacheKeyForGroupUsers(java.lang.String prefix, CmsDbContext context, CmsGroup group)
Returns the cache key for the group users cache.java.lang.String
getCacheKeyForUserGroups(java.lang.String prefix, CmsDbContext context, CmsUser user)
Returns the cache key for the user groups cache.java.lang.String
getCacheKeyForUserPermissions(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_CmsCacheKey
Returns the cache key for the group users cache.- Specified by:
getCacheKeyForGroupUsers
in 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_CmsCacheKey
Returns the cache key for the user groups cache.- Specified by:
getCacheKeyForUserGroups
in 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_CmsCacheKey
Returns the cache key for the permission cache.- Specified by:
getCacheKeyForUserPermissions
in 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)
-
-