freshness tests which will attempt to revalidate the content.
* modules/cache/mod_disk_cache.c
(open_entity): If the root Vary index is stale, we don't need to throw away
potentially stale content - we can try to refresh it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@539054 13f79535-47bb-0310-9956-ffa450edef68
let us later throw away the renegotiated content due to a name mismatch.
We do not need to update the ->name field just before writing the headers as
the computed ->name on open and create is sufficient. Updating ->name here is
essentially a no-op - except in the case of Vary where the key has internally
changed (to account for the Vary prefix), but the original name has not.
However, writing the Vary'd-accounted key means that when we read the cache
next that we will error out and disregard the just renegotiated response and
fetch the content all over again - oops!
(This is largely a case where I think we may have overthought ourselves; hence
the explanation is here in the commit rather than in the file itself.)
* modules/cache/mod_disk_cache.c
(store_headers): The originally opened ->name is sufficient.
* CHANGES: Combined with r538992, note that renegotiation for Vary's seem to
work far better.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@538997 13f79535-47bb-0310-9956-ffa450edef68
the refreshed .vary structure in the right directory. Otherwise, we'll create
a new .vary layout underneath the already existing one - oops!
* modules/cache/mod_disk_cache.c
(store_headers): Temporarily clear dobj->prefix if it is set to ensure that
we create the .vary structure underneath the cache root.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@538992 13f79535-47bb-0310-9956-ffa450edef68
hook, giving each cache backend the ability to make a better
decision as to how it will allocate the tasks of writing to the
cache and writing to the network. Previously the write to the
cache task needed to be complete before the same brigade was
written to the network, and this caused timing and memory issues
on large cached files. This fix replaces the previous fix for
PR39380.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@468373 13f79535-47bb-0310-9956-ffa450edef68
close/flush, remove some unneccessary code duplication instead
of calling the right helper in replace_brigade_with_cache().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@462601 13f79535-47bb-0310-9956-ffa450edef68
for the CacheMaxFileSize and CacheMinFileSize parameters in the
config file. PR39380 [Niklas Edmundsson <nikke acc.umu.se>]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@450042 13f79535-47bb-0310-9956-ffa450edef68
then
- Do not cache it.
- Signal the client that something went wrong by closing the connection
and not sending the last-chunk marker if the response was T-E chunked.
server/core_filters.c : Close the connection to the client by setting
c->keepalive to AP_CONN_CLOSE.
modules/http/chunk_filter.c : Do not send last-chunk marker in the case
the backend broke.
modules/proxy/mod_proxy_http.c: Signal that the backend connection broke.
modules/cache/mod_disk_cache.c: Respect r->no_cache for discarding the response
Submitted by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem
Reviewed by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357461 13f79535-47bb-0310-9956-ffa450edef68
(up to the cache root) to get rid of unused empty directories.
* cache/mod_disk_cache.c
(remove_url): Try to delete directories; also change two APR_ENOENT to
APR_STATUS_IS_ENOENT.
(Justin tweaked some comments.)
Submitted by: Rudiger Plum <ruediger.pluem vodafone.com>
Reviewed by: Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232334 13f79535-47bb-0310-9956-ffa450edef68
These Vary headers are used to build a new hash for a URL, based on the
client's headers. This allows mod_disk_cache to store many variations of one
URI, where previously it would only store a single variant.
htcacheclean needs to be updated to understand the new file format. I plan on
updating htcacheclean in the next couple days.
PR: 35211
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190530 13f79535-47bb-0310-9956-ffa450edef68
* modules/cache/mod_disk_cache.c
(store_headers): Stop second guessing mod_cache and just store the
headers in a new file (overwriting the old).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156306 13f79535-47bb-0310-9956-ffa450edef68
* modules/cache/mod_cache.c: If we add a new Expires value, tell our client;
merge in headers properly (or better than before) so that we can update the
header fields on a revalidated but with updated header fields.
* modules/cache/mod_cache.h, modules/cache/cache_storage.c:
Add preserve_orig flag to ap_cache_accept_headers to allow updating of fields.
* modules/cache/mod_disk_cache.c: Load status value from disk.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152973 13f79535-47bb-0310-9956-ffa450edef68