OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium 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 by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from appengine_wrappers import GetAppVersion | |
6 from cache_chain_object_store import CacheChainObjectStore | 5 from cache_chain_object_store import CacheChainObjectStore |
| 6 from environment import GetAppVersion |
7 from memcache_object_store import MemcacheObjectStore | 7 from memcache_object_store import MemcacheObjectStore |
8 from test_object_store import TestObjectStore | 8 from test_object_store import TestObjectStore |
9 from persistent_object_store import PersistentObjectStore | 9 from persistent_object_store import PersistentObjectStore |
10 | 10 |
11 _unspecified = object() | 11 _unspecified = object() |
12 | 12 |
13 class ObjectStoreCreator(object): | 13 class ObjectStoreCreator(object): |
14 '''Creates ObjectStores with a namespacing and behaviour configuration. | 14 '''Creates ObjectStores with a namespacing and behaviour configuration. |
15 | 15 |
16 The initial configuration is specified on object store construction. When | 16 The initial configuration is specified on object store construction. When |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 if value is not None) | 71 if value is not None) |
72 | 72 |
73 if self._disable_wrappers: | 73 if self._disable_wrappers: |
74 return self._store_type(namespace, start_empty=start_empty) | 74 return self._store_type(namespace, start_empty=start_empty) |
75 | 75 |
76 if self._store_type is not None: | 76 if self._store_type is not None: |
77 chain = (self._store_type(namespace),) | 77 chain = (self._store_type(namespace),) |
78 else: | 78 else: |
79 chain = (MemcacheObjectStore(namespace), PersistentObjectStore(namespace)) | 79 chain = (MemcacheObjectStore(namespace), PersistentObjectStore(namespace)) |
80 return CacheChainObjectStore(chain, start_empty=start_empty) | 80 return CacheChainObjectStore(chain, start_empty=start_empty) |
OLD | NEW |