Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[contents] Add server side caching for all requests (If-Modified-Sinc…
…e) (#889) This commit adds a cache for 'getContents' to '/cache/server'. All contents are cached by default (even in debug mode). If debug mode is enabled, the cached data is overwritten on each request. In normal mode RSS-Bridge adds the 'If-Modified-Since' header with the timestamp from the previously cached data (if available) to the request. Find more information on 'If-Modified-Since' here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since If the server responds with "304 Not Modified", the cached data is returned. If the server responds with "200 OK", the received data is written to the cache (creates a new cache file if it doesn't exist yet). No changes were made for all other response codes. Servers that don't support the 'If-Modified-Since' header, will respond with "200 OK". For servers that respond with "304 Not Modified", the required band- width will decrease and RSS-Bridge will responding faster. Files in the cache are forcefully removed after 24 hours. Notice: Only few servers actually do support 'If-Modified-Since'. Thus, most bridges won't be affected by this change.
- Loading branch information