Browse Source

Remove custom sorl key-value store

As far as I can tell, it was added to circumvent a problem in Sorl. The
problem was fixed in
https://github.com/mariocesar/sorl-thumbnail/pull/167, and we use a
released version that contains the fix.

I also don't see it being used anywhere. So it seems safe to delete it.
master
Maik Hoepfel 10 years ago
parent
commit
8d73c02314
1 changed files with 0 additions and 17 deletions
  1. 0
    17
      oscar/sorl_kvstore.py

+ 0
- 17
oscar/sorl_kvstore.py View File

@@ -1,17 +0,0 @@
1
-from django.core.cache import cache
2
-
3
-from sorl.thumbnail.conf import settings
4
-from sorl.thumbnail.kvstores.cached_db_kvstore import KVStore
5
-from sorl.thumbnail.models import KVStore as KVStoreModel
6
-
7
-
8
-class ConcurrentKVStore(KVStore):
9
-    """
10
-    Custom KV store for Sorl to avoid integrity errors when settings new
11
-    values.
12
-    """
13
-
14
-    def _set_raw(self, key, value):
15
-        KVStoreModel.objects.get_or_create(
16
-            key=key, defaults={'value': value})
17
-        cache.set(key, value, settings.THUMBNAIL_CACHE_TIMEOUT)

Loading…
Cancel
Save