Class CmsDriverManager.ResourceOUCacheKey

  • Enclosing class:
    CmsDriverManager

    public static class CmsDriverManager.ResourceOUCacheKey
    extends java.lang.Object
    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.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • getDbContext

        public CmsDbContext getDbContext()
        Gets the stored DB context.

        Note that the DB contex returned by this may have been invalidated!

        Returns:
        the stored DB context
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()