OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
3 // found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
4 | 4 |
5 // Package dscache provides a transparent cache for RawDatastore which is | 5 // Package dscache provides a transparent cache for RawDatastore which is |
6 // backed by Memcache. | 6 // backed by Memcache. |
7 // | 7 // |
8 // Inspiration | 8 // Inspiration |
9 // | 9 // |
10 // Although this is not a port of any particular implementation, it takes | 10 // Although this is not a port of any particular implementation, it takes |
11 // inspiration from these fine libraries: | 11 // inspiration from these fine libraries: |
12 // - https://cloud.google.com/appengine/docs/python/ndb/ | 12 // - https://cloud.google.com/appengine/docs/python/ndb/ |
13 // - https://github.com/qedus/nds | 13 // - https://github.com/qedus/nds |
(...skipping 163 matching lines...) Loading... |
177 // | 177 // |
178 // Note that flusing memcache of a running application may also induce this | 178 // Note that flusing memcache of a running application may also induce this |
179 // race. Flushes should be performed with this concern in mind. | 179 // race. Flushes should be performed with this concern in mind. |
180 // | 180 // |
181 // TODO: A potential mitigation to lock eviction poisoning is to use memcache | 181 // TODO: A potential mitigation to lock eviction poisoning is to use memcache |
182 // Statistics to identify the oldest memcache item and use that age to bound | 182 // Statistics to identify the oldest memcache item and use that age to bound |
183 // the lifetime of cached datastore entries. This would cause dscache items | 183 // the lifetime of cached datastore entries. This would cause dscache items |
184 // created around the time of a flush to expire quickly (instead of never), | 184 // created around the time of a flush to expire quickly (instead of never), |
185 // bounding the period of time when poisoned data may reside in the cache. | 185 // bounding the period of time when poisoned data may reside in the cache. |
186 package dscache | 186 package dscache |
OLD | NEW |