Hi, As for many other things Wicket has IStoreSettings for page stores related configuration.
On Wed, Sep 24, 2014 at 1:50 AM, Garret Wilson <[email protected]> wrote: > All, > > Can someone point me to the technical details of where and what Wicket > caches? I'm not talking about the programming object model as such. I mean > more practical matters such as: > > * In what directory does Wicket store cached stuff (e.g. page > versions)? Is this just the Java temporary directory (e.g. %Temp% on > The default impl uses getServletContext().getAttribute("javax.servlet.context.tempdir") https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/settings/StoreSettings.java#L126 > Windows)? Is this some standard directory in the the servlet > container? If I'm using embedded Jetty, any idea where I could find > the cached Wicket stuff? > Using wicket-examples' Ajax examples creates folder: /tmp/jetty-0.0.0.0-8080-webapp-_-any-/AjaxApplication-filestore/3438/3852/1adp8zk9x4bocaztj61gwkbsg/ with a single file in it named "data" > * What naming convention does Wicket used for caches? If I find the > temporary directory, how could I figure out which things are from > It uses the name of the WicketFilter from your web.xml with suffix "filestore" The next two folders are created from the sessionId to avoid having too many folders in one parent folder. https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/pageStore/DiskDataStore.java#L568 And then is a folder with name using the sessionId. > Wicket? Which things are cached paged versions? > The file with name "data" is where Wicket stores the byte[] for each page. Its max size is controlled with org.apache.wicket.settings.StoreSettings#getMaxSizePerSession. Wicket appends each page to the file until it reaches the max size. Then the oldest page is overridden with the newest one. > * How can I tell Wicket to throw away all old caches? I found out > Session#clear() > (sadly) today on the users list that there's no easy way to turn off > Wicket page versioning, which means that no matter what I do, I'm > going to have a bunch of outdated cache junk for versioned pages > lying around somewhere. How do I get rid of them? How do I tell > Wicket to throw them away? > > > Pardon me if I missed this information in the documentation somewhere. > http://wicket.apache.org/guide/guide/internals.html#pagestoring > > Thanks, > > Garret > >
