문제

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?

도움이 되었습니까?

해결책

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”
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top