Scheduled content not show until cache reset

I'm curious how Plone administrators normally deal with scheduled content not appearing until Plone restarts.


Can you describe what your specific problem is?

I'm curious how you can expect help from other Plone users by posting a one liner open question where half of the required deployment knowledge and documentation could be relevant.

Yes, this may sound a bit unfriendly: please be respectful of other forum participants their time.

Thanks for your reply.

I have posted a scheduled content (set the date), and it doesn't show up on time until i restart the plone instance.

It's not an error (so there is no trackback log), and I don't know how to tell in long form.

For my limit understand, it may because of the plone cache (or behind the varnish)? it will show up as published once I restart the instance.

Does it work going directly to the instance (localhost:8080 for example)?

Thanks for your reply.

Just checked yes, it show when visit to 8080... so it's the front cache... I know here is not the varnish forum but if someone using it may give me some hit on how to fix this, many thank.

First, check if is installed and configured correctly. Without Plone setting the correct caching headers, everything is possible.

Usually, Varnish is set to a couple of minute lifespan. Maybe, as @jensens suggested, the cache settings are too strong. You can also debug varnish caching rules and use varnishlog to see what happen really. By default, plone.recipe.varnish will setup things correctly. you should have set beresp.grace = 600s; somewhere in your vcl. Also, importante, in Plone cache settings, configure the right url for cache purging, so if you save a page its cache will be invalidated. You should have something like:
http://localhost:<varnish port> as proxy caching and
https://mysiteaddress.ext:443 as the external domain (use also http and :80 if you've one)

Yes is installed and turned on.

Have import varnish in front (I think rules) to plone.

What should I check next? Many thanks.

There is also the referencing issue. OP's refined issue description is "and it doesn't show up on time until i restart the plone instance."

Where does it not show up? Maybe a new News Item, or a changed title of an item in a news item listing on the homepage. The homepage is cached upon request in Varnish with a TTL and probably also in the end user browser by setting cache control headers.

If you update the news item, the news item itself is invalidated in Varnish if you have set up active purging, but the cached homepage object in Varnish is not purged. There are technical solutions to this (uuids in a secondary cache key in Varnish), but this complex and not set up by default in the vcl of Plone.recipe.varnish and the Plone Caching setup (GitHub - collective/collective.purgebyid)

The defaults for for page like objects is 1 hour, so for normal pages also news portlets on the side referencing other content that might have been updated since the page was generated will be cached and stale for an hour. Lowering the TTL's of most content in varnish and the browser client to 5-10-15-20 minutes is the most straightforward route to balance efficiency and freshness.

Plone supports 304 not modified requests, where the browser doesn't request the whole page but first checks using the received hash with the server if the page has changed.
But as described above: Plone by default doesn't keep record of the relation between a news item and its reference on the homepage or other views in the site, so Plone happily reports that the homepage has not been changed with a 304 not modified. Unless you add for example the catalog counter to that if-modified-since hash cachekey sent to the client. But this will invalidate way too many pages on a busy site: if you only add/change 1 content item that gets reindexed and increases the catalog counter the whole site cache becomes invalidated.

plone.recipe.varnish work with plone 6? Since I don't sure so I have not use it. Thanks

Yes it (plone.recipe.varnish) works with Plone 6 'classic ui'. Not much has changed in the cacheing setup between Plone 5 and Plone 6 on the server side, and also not on the Varnish side.

Varnish Software has unfortunately become less Open Source friendly in recent years by releasing a 'short lived' and max 12 months supported functional release, but the latest LTS release in the meantime is 2+ years old and a new LTS release is not mentionned.

Their commercial Varnish Plus offering is more stable/supported but they have switched to value based pricing, so depending on what they think you can bleed they will charge you for a Varnish Plus setup.

1 Like

The content type is news item but I renamed it to blog post. And it don't show up in the collection that list all posts. Thanks.

My system already have the varnish installed, (if I don't want to compile form source) any where I just got a working vcl file?

Just add this two seems, nothing happen after buildout.

recipe = plone.recipe.varnish:configuration
backends =

recipe = plone.recipe.varnish:script
bind =
cache-size = 512M

you miss the varnish-build part

recipe = plone.recipe.varnish:build

Strange... I add all 3 section to my mac test machine , and it still do nothing thanks.

did you also add the buildout part to run them?

I mean from:

parts +=

subprocess.CalledProcessError: Command './configure --prefix="/home/XXX/Plone6rc1/zinstance/parts/varnish-build" --with-sphinx-build=false --with-sphinx-build=false' returned non-zero exit status 1.

Is this not work with python 3.11?


Just find it.

parts =

recipe = plone.recipe.varnish:script

recipe = plone.recipe.varnish:configuration

to make a config and script and use system varnish

But still error is that because of my varnish is 6.6.1 ?

plone.recipe.varnish readme & text on pypi, 2nd paragraph

PLEASE NOTE: Version 6.x of this recipe now ‘supports’ Varnish 6.0 LTS only. Template generation support for older unsupported Varnish versions or the intermediate development versions have been removed. Varnish Software (the company) has switched to a half yearly time boxed release cycles without rigorous quality assurance, from which an lts version is picked when deemed stable enough

IIRC I deployed a Plone 6 rc1 buildout with Python 3.11 this week that also uses plone.recipe.varnish. Didn’t see any issues there, but that’s no guarantee.