Closed (fixed)
Project:
Varnish
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2009 at 01:51 UTC
Updated:
2 Apr 2015 at 08:04 UTC
Jump to comment: Most recent
Here's my issue for dealing with other content types
http://drupal.org/node/453908
I've hit a brick wall when it comes to views and panels. Also we should try to keep similar data structures & info grabbing functions. We might want to make a module that does this, once the Varnish module is up and running; so both projects can depend & benefit from it.
Comments
Comment #1
mikeytown2 commentedping... I think I figured out how to expire views based on a node changing. Node creation and views... still looking for a sane solution. Could run every view and make a note of nid's that match the newly created one... maybe I do that on cron, instead of on node creation via boost_has_site_changed() function. Panels have to be added manually so this would not be an issue ATM.
Comment #2
mikeytown2 commentedhttp://drupal.org/project/expire
Comment #3
mikeytown2 commentedhook_expire_cache() is the hook, returns array of all the urls to expire. I also need a hook for a cache flush as well.
Comment #4
vacilando commentedSubscribing.
Comment #5
bibo commented@ mikeytown2
It seems you've found views_content_cache and cache_actions after that comment :) I also happen to be using both of them, and have been actually wondering how hard it would be to implement varnish purge support that works with views_content_cache? That is: when node of type x and y are added/updated, views_content_cache clears the views AND varnish-module recognizes this and purges the cache for the view/panel url. Would it be possible?
Expire-module sounds usefull, but judging from the description..
.. expire only works with boost, right? Can it be used for anything if I dont have boost? Boost + Varnish somehow seems like duplicating the same effort without actual gain. Please tell me why this assumption is wrong :).
What if I want to flush some page caches more often than others, such as the frontpage? Do I have to create a custom module, or does expire provide options for that?
Comment #6
mikeytown2 commentedExpire is a stand alone; does not use boost in any way, other then some of the code looks very similar ;)
Neither one of my projects (boost or expire) deals with views or panels internal cache. This is something to look into further down the road.
In terms of views/panels, in Boost we record what nodes show up when the view or panel is rendered. Then when that node changes, Boost knows where that node lives and mark those pages as expired. This requires a database in order to keep track of node deletions; thus it is still only in the boost module. I'm currently thinking up some ideas on how to make the code faster. Boost records this info on page views (it's already rendered and we get the URL as well) but this causes too many writes to the database. So the next step is to make the update logic for the database smarter (its very dumb right now). Step after that is to get Boost argument, pager and url query string aware. Once that is in place then some truly awesome cache expiration code can be written. Read this for more info: http://groups.drupal.org/node/100134#comment-319014
BTW you can use boost and varnish at the same time; at work we use boost for its expiration logic and as a backup in case servers die on us and we need a static cache to be served while varnish gets populated with Drupal again
Comment #7
bibo commentedThanks mikeytown2 for your interesting and detailed answer :). The leading text on the expire project page still seems a bit misleading to me, since I can only read it as "this module requires boost".
I will be soonish in a project where we will be using varnish extensively (with ESI), and now I know we can use the expire-module whether we use (the awesomeness of) boost or not. Good point about the backup system, we probably will be using both.
Comment #8
YK85 commentedHello,
I was wondering if there may have been further development with expiring of cache for specific nodes after updates etc?
Thank you!
Comment #9
fabsor commentedIf you use the expire module together with this module, it will expire nodes in varnish after you update them, so that should already be working. It also works for creation and deletion of nodes.
Comment #10
misc commentedAs a part of a clean up of the issue queue for the varnish module I am closing tickets that had no activity for the last year, please feel free to re-open if needed.