GithubHelp home page GithubHelp logo

vcl-cache-validation's People

Contributors

the-allanc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vcl-cache-validation's Issues

Create test suite.

This will need to be done fairly early in the process to ensure everything works as expected.

Figure out a way of If-Modified-Since headers not being passed to backend

This has really disheartened me a bit. Varnish won't pass on validation headers on to the backend server (well, at least If-Modified-Since). It took a while to figure out, but it explicitly strips out If-Modified-Since headers in cache_esi_deliver.c.

(Update: And If-None-Match headers too. Crap. Can't figure out where the code to do this is though.)
(Further update: Actually, all known validating headers seem to be stripped out.)
(More debugging later: I think it's all defined in http_headers.h. That's a tidy way to do it.)

So - Varnish strips out these headers, so I can't pass them along to the backend server. I think I'll have to find what the best way is to transmit these headers in the request (maybe just adding X- prefixes to the lot of them).

On a sidenote, there is the experimental-ims branch of Varnish which provides full support for this sort of thing, which is probably a nicer alternative than using any scripts that I write here.

However, that branch appears to be at least a year out-of-date, as well as not being entirely clear whether the API it uses will change or not. Varnish 4 might be out relatively soon, but it's still not clear that it will incorporate support for it or not. So I'll persist on this route for now.

Does hash_always_miss mean we can simplify scripts?

Some of the approaches to deal with Varnish centre around the fact updating a cached document is difficult.

However, this page seems to indicate that req_always_miss will update the cache. The question is, does this cause the content to be purged before vcl_fetch has a chance to examine the beresp object?

If the content is purged, then we're still in the same boat - we can't test to see if a document has been modified or not without sacrificing the original cached content. But if we can examine the response without fear of losing the original cached document, then that would simplify the script somewhat and allow us to drop a number of various hacks which I've come up with.

I would have thought that during my research that I would have come across this already, so I do find it a bit surprising. Anyway, let's check.

Move to "go" from Python

The current prototype web server which I have experimented with uses CherryPy. Before I being work on the test suite, I'd like to move to using Go - just to give myself a chance to experiment with it. May work or fail, but let's give it a try!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.