Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cache] purging #501

Closed
krizhanovsky opened this issue May 23, 2016 · 1 comment
Closed

[Cache] purging #501

krizhanovsky opened this issue May 23, 2016 · 1 comment

Comments

@krizhanovsky
Copy link
Contributor

krizhanovsky commented May 23, 2016

Manual cache purging must be implemented. An example of the purging is

    $ curl -X PURGE <URL>

which sends

    PURGE / HTTP/1.1\r\n
    User-Agent: curl/7.40.0\r\n
    Host: <host>\r\n
    Accept: */*\r\n
    \r\n

Following new configuration options must be introduced:

  • cache_purge - cache purging mode, binary variable for first implementation, but can be extended in future (e.g. setting eviction strategy and speed for purged entries). "invalidate" value (default and the first implemented) means that purged entries are just invalidated and still can be returned to a client under certain conditions (Servicing stale cached responses and immediate purging #522, note that for 0.5 we never return stale responses, so this is just fake purging). "purge" means real purging backed by TDB deletion operator (this mode depends on TDBv0.3: transactions, indexes, durability #516).
  • cache_purge_acl - control who can purge the cache by list of IP addresses or netmasks.

See Nginx, Varnish and Squid implementations as reference examples.

Wildcard purging is not necessary at this time.

Use case. If some content is changed at upstream server, then PURGE request followed by GET request will update appropriate entry in the cache.

@krizhanovsky krizhanovsky added this to the 0.5.0 Web Server milestone May 23, 2016
keshonok added a commit that referenced this issue Jun 17, 2016
When cache is not enabled but cache_purge directive is enabled, then
PURGE requests are still handled correctly and return HTTP 403 error.
Related to #501.
keshonok added a commit that referenced this issue Jun 20, 2016
When cache is not enabled but cache_purge directive is enabled, then
PURGE requests are still handled correctly and return HTTP 403 error.
Related to #501.
keshonok added a commit that referenced this issue Jun 20, 2016
When cache is not enabled but cache_purge directive is enabled, then
PURGE requests are still handled correctly and return HTTP 403 error.
Related to #501.
keshonok added a commit that referenced this issue Jun 20, 2016
When cache is not enabled but cache_purge directive is enabled, then
PURGE requests are still handled correctly and return HTTP 403 error.
Related to #501.
keshonok added a commit that referenced this issue Jun 20, 2016
Implement manual cache purging using HTTP PURGE method. (#501)
@keshonok
Copy link
Contributor

Implemented in #558.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants