Does Varnish support Dependency Graph Cache Invalidation?

Geert-Jan

Consider (the hypothetical ) case in which a page is cached which contains blogsposts which in turn contains comments. Now 1 comment changes. This means the cache for the blogpost has to be invalidated and (transitively) the cache for the page has to be invalidated.

In other words: items relate to eachother in a way that can be described as a Dependency Graph (which is a Directed Acyclic Graph )

Does Varnish support this type of Cache invalidation? If not, any other implementation, research, etc. that partially covers this?

Clarence

There's no support for exactly what you are asking for but as a workaround you can put tags in your headers as to what comments they are dependent on. For example sending a:

x-depend-comments: 2578 2579 2580

And then at an update of a comment you can send a ban request as:

ban obj.http.x-depend-comments ~ “\D2578\D”

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related