Hello, Ben!
Your suggestion is great and I've implemented it in
https://github.com/apache/tapestry-5/commit/d6c4324215337b3bfb9ed8e62dd7174e0427410d
. It's some code that will be called a low number times during the
application runtime, so I decided to not try to optimize the
just-1-page-name
Hi Thiago,
I like your implementation as a general solution better, as it solves the
problem in a simple and straightforward way, whereas my approach would only
provide the tools to build a solution by yourself.
One thing I might have added is a helper method in the ReferenceType to
create the
Hello!
So I've just implemented what I suggested in Tapestry 5.8.3:
https://issues.apache.org/jira/browse/TAP5-2756. Example:
public static void contributePageCachingReferenceTypeService(
OrderedConfiguration
configuration) {
configuration.add("VeryLarge", p ->
Hello!
Your're right, overriding an internal service is usually an invitation for
trouble with any bigger Tapestry update.
Still, personally, I prefer a service override over cron jobs triggering
things behind the scenes.
Especially since it's one of Tapestry's greatest features to replace almost
Hello, everyone!
I prefer Ben's idea of a thread or cron job to keep it fresh other
than overriding a service, especially now that I'm working on
something (smarter page invalidation, which is actually smarter
invalidation of some key Tapestry caches) which changes that
PageSourceImpl a bit and
Thank you Ben. I may have to go this route if I can’t find a way to make the
page much lighter to load.
Geoff
> On 28 Dec 2022, at 5:55 pm, Ben Weidig wrote:
>
> Hi Geoff,
>
> I've read through the SoftReference documentation and as far as I
> understand it the references do only get
Hi Geoff,
I've read through the SoftReference documentation and as far as I
understand it the references do only get garbage-collected in case of
memory-pressure.
However, the behavior to keep recently used objects is only encouraged, not
explicitly required.
Looking over the source code, you
Hi,
I have one page in my production app which takes a long time to load - minimum
18 seconds. Once loaded, it is very quick to request. But from time to time
throughout the day, when this page is requested Tapestry decides it has to
reload it. I presume this is because the page cache uses