I was wondering if it was possible to invalidate cached object by url.
Say i have the url /api/0.1/user and the url /api/0.1/userFriends what i´d like to know, is if there is a way to make /api/0.1/user invalidated when a PUT request to /api/0.1/userMedia is made. However it should only invalidate cache by the http header Authorization. so basically only invalidate cache for the user which performed the PUT request.
I reckon i need a ban configuration to make this work, but im fairly new to varnish, so an example would be greatly appreciated!
It should be possible. If you have something like this in vcl_recv:
This is completely untested. "man vcl" for more info on vcl syntax and semantics.