private static Cache getCacheByProperty( String property )
    {
        if ( !property.startsWith(PROPERTY_PREFIX_CACHE))
        {
            return null;
        }

        // Extract the cache name identifier from the property name.
        final String name = property.substring(PROPERTY_PREFIX_CACHE.length(), property.lastIndexOf("."));

        // See if property is using the short name variant.
        for ( final Map.Entry<String, String> entry : cacheNames.entrySet() )
        {
            if ( name.equals( entry.getValue() ) )
            {
                return caches.get( entry.getKey() );
            }
        }

        // If not a short name, then try for a normalized name.
        for ( final Map.Entry<String, Cache> entry : caches.entrySet() )
        {
            if ( entry.getKey().replaceAll(" ", "").equals( name ) )
            {
                return entry.getValue();
            }
        }

        return null;
    }
Sets a local property which overrides the maximum cache entry lifetime
for the supplied cache name.
@param cacheName the name of the cache to store a value for.
@param lifetime the maximum cache entry lifetime.
xmppserver/src/main/java/org/jivesoftware/util/cache/CacheFactory.java