[Webkit-unassigned] [Bug 49672] Allow no-store resources to be used for back navigation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 17 14:47:05 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=49672





--- Comment #8 from Darin Adler <darin at apple.com>  2010-11-17 14:47:05 PST ---
(From update of attachment 74133)
View in context: https://bugs.webkit.org/attachment.cgi?id=74133&action=review

>>> WebCore/loader/cache/CachedResource.h:124
>>> +    void setHistoryOnly(bool b) { m_historyOnly = b; }
>> 
>> Name these isStale() and setStale().
> 
> I originally had that exact naming scheme, but decided against it. My reasoning
> for switching to "history only" was that I thought "stale" was too similar to isExpired().
> This comes into play when a resource is received with other headers, such as "Expires",
> or "Cache-Control: max-age=..." and it outlives its freshness. I wanted to clearly
> indicate this new state of a resource, which is why I chose the longer name.
> 
> With this in mind, would "stale" still be a better choice? It does match more closely
> to the CachePolicy name (AllowsStale). If not, should I change the "allowsStale"
> variable name to MemoryCache::requestResource be changed instead?

The names should probably then be isForHistoryOnly, m_isForHistoryOnly, and setForHistoryOnly.

> WebCore/loader/cache/CachedResourceLoader.cpp:266
> +    bool allowStaleResources = cachePolicy() == CachePolicyAllowStale;

The CachePolicy value should probably be changed to something like CachePolicyHistoryBuffer or something along those lines.

> WebCore/loader/cache/MemoryCache.cpp:97
> +CachedResource* MemoryCache::requestResource(CachedResourceLoader* cachedResourceLoader, CachedResource::Type type, const KURL& url, const String& charset, bool requestIsPreload, bool allowStale)

This argument name should be something like forHistory.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list