/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/ |
RewriteResponseCacheControl.java | 18 import com.squareup.okhttp.Cache; 27 /** Dangerous interceptor that rewrites the server's cache-control header. */ 32 .header("Cache-Control", "max-age=60") 40 Cache cache = new Cache(cacheDirectory, 1024 * 1024); local 41 cache.evictAll(); 44 client.setCache(cache); 56 // Force this request's response to be written to the cache. This way, subsequent responses 57 // can be read from the cache [all...] |
/external/guava/guava/src/com/google/common/cache/ |
ForwardingCache.java | 17 package com.google.common.cache; 32 * A cache which forwards all its method calls to another cache. Subclasses should override one or 33 * more methods to modify the behavior of the backing cache as desired per the 40 public abstract class ForwardingCache<K, V> extends ForwardingObject implements Cache<K, V> { 46 protected abstract Cache<K, V> delegate(); 129 * constructed {@link Cache} as the delegete. 135 private final Cache<K, V> delegate; 137 protected SimpleForwardingCache(Cache<K, V> delegate) { 142 protected final Cache<K, V> delegate() [all...] |
/external/guava/guava-tests/test/com/google/common/cache/ |
ForwardingCacheTest.java | 17 package com.google.common.cache; 37 private Cache<String, Boolean> forward; 38 private Cache<String, Boolean> mock; 48 mock = createMock(Cache.class); 50 @Override protected Cache<String, Boolean> delegate() { 126 protected Cache<K, V> delegate() {
|
CacheTesting.java | 15 package com.google.common.cache; 27 import com.google.common.cache.LocalCache.LocalLoadingCache; 28 import com.google.common.cache.LocalCache.ReferenceEntry; 29 import com.google.common.cache.LocalCache.Segment; 30 import com.google.common.cache.LocalCache.ValueReference; 52 * A collection of utilities for {@link Cache} testing. 59 * Poke into the Cache internals to simulate garbage collection of the value associated with the 65 static <K, V> void simulateValueReclamation(Cache<K, V> cache, K key) { 66 ReferenceEntry<K, V> entry = getReferenceEntry(cache, key) [all...] |
CacheBuilderGwtTest.java | 17 package com.google.common.cache; 57 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 69 cache.put(0, 10); 71 assertEquals(Integer.valueOf(10), cache.get(0, loader)); 72 assertEquals(Integer.valueOf(1), cache.get(20, loader)); 73 assertEquals(Integer.valueOf(2), cache.get(34, loader)); 75 cache.invalidate(0); 76 assertEquals(Integer.valueOf(3), cache.get(0, loader)); 78 cache.put(0, 10) 84 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 119 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 137 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 154 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 181 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 212 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 279 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 318 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 336 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 351 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 377 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 395 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 413 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 431 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 453 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 471 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local 491 Cache<Integer, Integer> cache = CacheBuilder.newBuilder() local [all...] |
/frameworks/volley/src/test/java/com/android/volley/toolbox/ |
HttpHeaderParserTest.java | 19 import com.android.volley.Cache; 55 Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response); 68 Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response); 79 Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response); 91 Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response); 106 Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response); 123 Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response); 133 headers.put("Cache-Control", "public, max-age=86400"); 135 Cache.Entry entry = HttpHeaderParser.parseCacheHeaders(response); 151 headers.put("Cache-Control", "max-age=86400, stale-while-revalidate=604800") [all...] |
/external/compiler-rt/lib/sanitizer_common/ |
sanitizer_quarantine.h | 45 typedef QuarantineCache<Callback> Cache; 60 void Put(Cache *c, Callback cb, Node *ptr, uptr size) { 66 void NOINLINE Drain(Cache *c, Callback cb) { 84 Cache cache_; 88 Cache tmp; 101 void NOINLINE DoRecycle(Cache *c, Callback cb) { 115 // Per-thread cache of memory blocks.
|
/libcore/ojluni/src/main/java/sun/security/ssl/ |
SSLSessionContextImpl.java | 36 import sun.security.util.Cache; 40 private Cache<SessionId, SSLSessionImpl> sessionCache; 41 // session cache, session id as key 42 private Cache<String, SSLSessionImpl> sessionHostPortCache; 43 // session cache, "host:port" as key 44 private int cacheLimit; // the max cache size 49 cacheLimit = getDefaultCacheLimit(); // default cache size 53 sessionCache = Cache.newSoftMemoryCache(cacheLimit, timeout); 54 sessionHostPortCache = Cache.newSoftMemoryCache(cacheLimit, timeout); 115 * Sets the size of the cache used for storin [all...] |
/external/clang/include/clang/Basic/ |
FileSystemStatCache.h | 45 /// \brief Abstract interface for introducing a FileManager cache for 'stat' 61 /// \brief Get the 'stat' information for the specified path, using the cache 72 std::unique_ptr<vfs::File> *F, FileSystemStatCache *Cache, 75 /// \brief Sets the next stat call cache in the chain of stat caches. 76 /// Takes ownership of the given stat cache. 77 void setNextStatCache(std::unique_ptr<FileSystemStatCache> Cache) { 78 NextStatCache = std::move(Cache); 81 /// \brief Retrieve the next stat call cache in the chain. 84 /// \brief Retrieve the next stat call cache in the chain, transferring 85 /// ownership of this cache (and, transitively, all of the remaining caches [all...] |
/external/clang/lib/Basic/ |
FileSystemStatCache.cpp | 35 /// path, using the cache to accelerate it if possible. This returns true if 45 FileSystemStatCache *Cache, vfs::FileSystem &FS) { 49 // If we have a cache, use it to resolve the stat query. 50 if (Cache) 51 R = Cache->getStat(Path, Data, isFile, F, FS); 54 // no cache, just go to the file system. 114 // Do not cache failed stats, it is easy to construct common inconsistent 121 // Cache file 'stat' results and directories with absolutely paths.
|
/frameworks/volley/src/main/java/com/android/volley/ |
CacheDispatcher.java | 24 * Provides a thread for performing cache triage on a queue of requests. 26 * Requests added to the specified cache queue are resolved from cache. 28 * {@link ResponseDelivery}. Cache misses and responses that require 42 /** The cache to read from. */ 43 private final Cache mCache; 52 * Creates a new cache triage dispatcher thread. You must call {@link #start()} 57 * @param cache Cache interface to use for resolution 62 Cache cache, ResponseDelivery delivery) [all...] |
Cache.java | 23 * An interface for a cache keyed by a String with a byte array as data. 25 public interface Cache { 27 * Retrieves an entry from the cache. 28 * @param key Cache key 29 * @return An {@link Entry} or null in the event of a cache miss 34 * Adds or replaces an entry to the cache. 35 * @param key Cache key 36 * @param entry Data to store and metadata for cache coherency, TTL, etc. 41 * Performs any potentially long-running actions needed to initialize the cache; 47 * Invalidates an entry in the cache [all...] |
/external/chromium-trace/catapult/third_party/gsutil/gslib/addlhelp/ |
command_opts.py | 47 gsutil -h "Cache-Control:public,max-age=3600" \\ 56 Cache-Control 67 Note that for gs:// URLs, the Cache Control header is specific to 68 the API being used. The XML API will accept any cache control 70 respects only the public, private, no-cache, and max-age cache
|
/libcore/ojluni/src/main/java/sun/security/util/ |
Cache.java | 32 * Abstract base class and factory for caches. A cache is a key-value mapping. 52 * the GC automatically size the cache dynamically depending on the 60 * Cache sizing: the memory cache is implemented on top of a LinkedHashMap. 63 * maximum cache size to value that uses those buckets fully. For example, 64 * if a cache with somewhere between 500 and 1000 entries is desired, a 67 * buckets / 4 * 3. As mentioned above, with a SoftReference cache, it is 72 public abstract class Cache<K,V> { 74 protected Cache() { 79 * Return the number of currently valid entries in the cache [all...] |
/external/chromium-trace/catapult/telemetry/telemetry/testing/ |
decorators_unittest.py | 13 @decorators.Cache 24 @decorators.Cache
|
/external/skia/include/core/ |
SkImageFilter.h | 37 // This cache maps from (filter's unique ID + CTM + clipBounds + src bitmap generation ID) to 39 class Cache : public SkRefCnt { 42 virtual ~Cache() {} 43 static Cache* Create(size_t maxBytes); 44 static Cache* Get(); 55 Context(const SkMatrix& ctm, const SkIRect& clipBounds, Cache* cache) 58 , fCache(cache) 63 Cache* cache() const { return fCache; function in class:SkImageFilter::Context [all...] |
/external/pdfium/third_party/lcms2-2.6/src/ |
cmsxform.c | 301 // No gamut check, no cache, 16 bits 382 _cmsCACHE Cache; 392 // Get copy of zero cache 393 memcpy(&Cache, &p ->Cache, sizeof(Cache)); 399 if (memcmp(wIn, Cache.CacheIn, sizeof(Cache.CacheIn)) == 0) { 401 memcpy(wOut, Cache.CacheOut, sizeof(Cache.CacheOut)) [all...] |
/external/chromium-trace/catapult/telemetry/telemetry/core/ |
discover.py | 16 @decorators.Cache 63 @decorators.Cache 96 @decorators.Cache
|
/frameworks/volley/src/test/java/com/android/volley/ |
CacheDispatcherTest.java | 71 // A cache miss does not post a response and puts the request on the network queue. 81 // A non-expired cache hit posts a response and does not queue to the network. 83 Cache.Entry entry = CacheTestUtils.makeRandomCacheEntry(null, false, false); 91 // A soft-expired cache hit posts a response and queues to the network. 93 Cache.Entry entry = CacheTestUtils.makeRandomCacheEntry(null, false, true); 104 // An expired cache hit does not post a response and queues to the network. 106 Cache.Entry entry = CacheTestUtils.makeRandomCacheEntry(null, true, true);
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
CertStoreHelper.java | 44 import sun.security.util.Cache; 63 private static Cache<String, CertStoreHelper> cache field in class:CertStoreHelper 64 = Cache.newSoftMemoryCache(NUM_TYPES); 69 CertStoreHelper helper = cache.get(type); 85 cache.put(type, csh);
|
/external/chromium-trace/catapult/telemetry/telemetry/internal/platform/profiler/ |
android_prebuilt_profiler_helper.py | 20 @decorators.Cache
|
/external/skia/src/core/ |
SkImageFilterCacheKey.h | 11 struct SkImageFilter::Cache::Key {
|
/frameworks/volley/src/main/java/com/android/volley/toolbox/ |
HttpHeaderParser.java | 19 import com.android.volley.Cache; 34 * Extracts a {@link Cache.Entry} from a {@link NetworkResponse}. 37 * @return a cache entry for the given response, or null if the response is not cacheable. 39 public static Cache.Entry parseCacheHeaders(NetworkResponse response) { 62 headerValue = headers.get("Cache-Control"); 68 if (token.equals("no-cache") || token.equals("no-store")) { 98 // Cache-Control takes precedence over an Expires header, even if both exist and Expires 111 Cache.Entry entry = new Cache.Entry();
|
/external/llvm/lib/Support/ |
SourceMgr.cpp | 40 // Delete the line # cache if allocated. 41 if (LineNoCacheTy *Cache = getCache(LineNoCache)) 42 delete Cache; 91 // If we have a line number cache, and if the query is to a later point in the 94 if (LineNoCacheTy *Cache = getCache(LineNoCache)) 95 if (Cache->LastQueryBufferID == BufferID && 96 Cache->LastQuery <= Loc.getPointer()) { 97 Ptr = Cache->LastQuery; 98 LineNo = Cache->LineNoOfQuery; 106 // Allocate the line number cache if it doesn't exist [all...] |
/external/guava/guava-tests/benchmark/com/google/common/cache/ |
MapMakerComparisonBenchmark.java | 17 package com.google.common.cache; 47 private final Cache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build(); field in class:MapMakerComparisonBenchmark 48 private final Cache<Object, Object> cacheNoStats = CacheBuilder.newBuilder().build(); 53 cache.put(TEST_KEY, TEST_VALUE); 83 cache.getIfPresent(TEST_KEY);
|