The best thing to do (imo) is to trigger the purges directly in media wiki. I only did a quick search but they seem to already integrate easily with Varnish, to send cache purge requests on updates/changes https://m.mediawiki.org/wiki/Manual:Varnish_caching hope it helps!
On Dec 16, 2016 17:42, "Justin Lloyd" <[email protected]> wrote: > I actually have the TTL set to 48h now and it seems to work well, but I'm > not sure if there's anything specific I should do regarding invalidation. > In general, wikis don't allow for deleting or even changing images; you > just upload new ones and the wiki software keeps previous versions in the > revision history. However, I am concerned about invalidating cached images > when new versions are uploaded so that the previous version is purged from > the cache, but I'm not sure about the most appropriate way to handle that > from a Varnish or MediaWiki perspective. If you have any thoughts on that, > I'd appreciate it. > > -----Original Message----- > From: Dridi Boukelmoune [mailto:[email protected]] > Sent: Wednesday, December 14, 2016 7:20 AM > To: Justin Lloyd <[email protected]> > Cc: Florian Tham <[email protected]>; [email protected] > Subject: Re: Hit ratio dropped significantly after recent upgrades > > On Wed, Dec 14, 2016 at 2:58 PM, Justin Lloyd <[email protected]> wrote: > > So after increasing the TTL for thumbnail images to 4 hours, the hit > ratio got to 65-70%, objects in memory got up to around 150k before > tapering off (due to lots of expirations starting after 4 hours, as to be > expected) and slowly dipping back down to around 100k before starting on > the upswing again. I'm continuing to test increasing the TTL, setting it to > 24h and we'll see if we have any problems reported as a result in case > that's too long, but at any rate we definitely appear to have found the > smoking gun and I know where to tinker to try to better optimize things. > > > > I'm not sure why this changed with the upgrades, whether it was > something in MediaWiki or Varnish, but at least I know where to spend > cycles on optimizations. > > > > Thank you all very much for the help! > > Hi, > > Thanks for the feedback and glad to see things back to normal. > Consider sharing your findings with the MediaWiki folks as they will > likely know better how to deal with the thumbnails. > > If images/thumbnails aren't changing often, you can safely increase the > TTL (ideally directly from MediaWiki) as long as you have an invalidation > strategy in place. > > Cheers > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
