Hi.
Hmm. Does not seem to remove the session attribute „persistentPageManagerData“,
or lower it’s size.
It still stores a "org.apache.wicket.page.PageStoreManager$SessionEntry“ object
which seems to contain a serialized page.
It is still quite large. That’s my goal, to remove this session data to keep
the session size low.
I have a custom Akka Distributed Data session data store (on Jetty).
The first logging is without the „persistentPageManagerData“, manually removed,
and put back for the second logging.
DDataSessionDataStore$ - Serializing session...done in 0ms
DDataSessionDataStore$ - Session size: 5215
DDataSessionDataStore$ - Serializing session...done in 3ms
DDataSessionDataStore$ - Session size: 89995
My Application looks like this. I’ve used an AbstractPageStore here because it
already does the (de)serialization code needed for the data store.
setPageManagerProvider(new DefaultPageManagerProvider(this) {
override protected def newPageStore(dataStore: IDataStore): IPageStore = {
new AbstractPageStore(getFrameworkSettings().getSerializer(),
dataStore) {
override def getPage(sessionId: String, pageId: Int): IManageablePage
= {
deserializePage(getPageData(sessionId, pageId))
}
override def removePage(sessionId: String, pageId: Int): Unit = {
removePageData(sessionId, pageId)
}
override def storePage(sessionId: String, page: IManageablePage):
Unit = {
storePageData(sessionId, page.getPageId, serializePage(page))
}
override def unbind(sessionId: String): Unit = {}
override def canBeAsynchronous(): Boolean = true
}
}
})
Is it necessary to tweak something in PageStoreManager?
Manfred
> Am 15.04.2021 um 09:06 schrieb Martin Grigorov <[email protected]>:
>
> Hi,
>
> You need to create a custom IPageManagerProvider.
> To make it simpler you can extend from
> https://github.com/apache/wicket/blob/wicket-8.x/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java
> and override its #newPageStore(IDataStore)
> and return an IPageStore that does nothing but delegates to the IDataStore.
>
> Then in YourApplication#init() call setPageManagerProvider(yourProvider);
>
> On Wed, Apr 14, 2021 at 5:07 PM Bergmann Manfred <[email protected]>
> wrote:
>
>> Hi.
>>
>> Is there a way to disable the first level cache in Wicket 8?
>> Reading the documentation this should be the session attribute named:
>> „persistentPageManagerData“.
>> Since this attribute is written in PageStoreManager (specifically
>> PersistentRequestAdapter) I’m not entirely certain how to accomplish that
>> in a proper way.
>> It would be sufficient for me to run the application from the second level
>> cache only.
>>
>>
>> Manfred
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]