I have been testing the new Memory cache functionality, and have a few comments (and questions). For comments, is it better to simply post here, or should I open JIRA tickets? In any case, the first set of comments are
1) In the 'Caching Defaults' admin screen, ideally move the general cache setup parameters out of the 'Default Layer' section - they are not layer specific, and having them there forces people to activate default settings, even if they do not wish new layers to participate in caching.
2) For the 'Cache Eviction Policy' - it is not accepting the LRU and LFU options from the list. If these will not be used for memory cache, perhaps remove from the drop down list.
3) For the cache statistics section
a) Having both a Hit and Miss percentage is not really critical (miss = 100 - hit)
b) For Cache Memory Occupation - it would also be nice to have the maximum observed (in this session) level. This can be used to tell if you need to allocate more memory for the cache.
c) I have not done extensive checking on this, but the actual memory consumption on my Tomcat instances I am using for testing (which are otherwise identical to a V2.7 install) are using considerably more memory (5GB vs 2GB). This might be due to the build (debug stuff), but the cache numbers indicated here (15MB) are only a fraction of the delta. Either the cache is using much more than shown, or there is some other factor.
The immediate question I have is if there is some plan to support layer specific selection of the caching store (none, Disk, Memory, ...)? If not, will the memory store 'Persistence enabled' mode only be global, or can it be selected on a per-layer basis (there are no setting for this on individual layers now)?
The immediate question I have is if there is some plan to support layer
specific selection of the caching store (none, Disk, Memory, ...)? If
not, will the memory store 'Persistence enabled' mode only be global, or
can it be selected on a per-layer basis (there are no setting for this
on individual layers now)?
Per layer storage configuration is a new feature in GWC 1.8 as is the
memory storage. Unfortunately, these two features were added completely
independently so you can specify whether a layer should use local file
storage or the new S3 store, but not whether it should use the memory
store or not.
Both configurable storage and memory storage are built as wrappers
around other stores. The memory store wraps one other stores and
provides in memory caching on top of it, while the composite store wraps
several stores, and delegates to the appropriate store for the layer.
I think it should be possible to wrap the composite store inside the
memory store. So everything will use in memory caching, and the more
persistent storage underneath will be configurable. This is something
that still needs testing though. Ideally we would have this all worked
out before the beta on the 18th but I don't know that anyone has time to
work on it. I believe both features were added as development funded by
some specific client. Each client is probably happy with their feature
as is and would require some cajoling to fund that development, and the
developers involved are working on other things now as well. Otherwise
it's a matter of finding a developer who can justify working on this.
If you have some Java development capability you can spare, using that
to implement this yourself would very much be the best way to ensure
that per layer configuration of in memory caching is working. The
geowebcache-devel mailing list would be the best place to ask about
this.