diff --git a/backends/mizan-django/src/mizan/cache/__init__.py b/backends/mizan-django/src/mizan/cache/__init__.py index eec9d32..bd9f0ea 100644 --- a/backends/mizan-django/src/mizan/cache/__init__.py +++ b/backends/mizan-django/src/mizan/cache/__init__.py @@ -15,7 +15,7 @@ import logging import threading from typing import Any -from .backend import CacheBackend, MemoryCache, RedisCache +from mizan_core.cache.backend import CacheBackend, MemoryCache, RedisCache from mizan_core.cache.keys import derive_cache_key, CONTEXT_KEY_PREFIX logger = logging.getLogger("mizan.cache") diff --git a/backends/mizan-django/src/mizan/tests/test_core.py b/backends/mizan-django/src/mizan/tests/test_core.py index 67a44c7..80461aa 100644 --- a/backends/mizan-django/src/mizan/tests/test_core.py +++ b/backends/mizan-django/src/mizan/tests/test_core.py @@ -2782,7 +2782,7 @@ class CacheBackendTests(TestCase): """Tests for MemoryCache backend operations.""" def setUp(self): - from mizan.cache.backend import MemoryCache + from mizan_core.cache.backend import MemoryCache self.cache = MemoryCache() def test_get_miss(self): @@ -2825,7 +2825,7 @@ class CachePurgeTests(TestCase): def setUp(self): from mizan.cache import cache_put, set_cache - from mizan.cache.backend import MemoryCache + from mizan_core.cache.backend import MemoryCache self.cache = MemoryCache() set_cache(self.cache) @@ -2869,7 +2869,7 @@ class CacheIntegrationTests(TestCase): self.factory = RequestFactory() from mizan.cache import set_cache - from mizan.cache.backend import MemoryCache + from mizan_core.cache.backend import MemoryCache from mizan.setup.settings import clear_settings_cache self.cache = MemoryCache() @@ -3139,7 +3139,7 @@ class CachePolicyIntegrationTests(TestCase): """Context with mixed revs uses the maximum for cache key.""" from mizan_core.cache.keys import derive_cache_key from mizan.cache import set_cache, reset_cache - from mizan.cache.backend import MemoryCache + from mizan_core.cache.backend import MemoryCache from mizan.setup.settings import clear_settings_cache from django.test import override_settings @@ -3292,7 +3292,7 @@ class RedisCacheBackendTests(TestCase): def setUp(self): if _SKIP_REDIS: self.skipTest(_SKIP_MSG) - from mizan.cache.backend import RedisCache + from mizan_core.cache.backend import RedisCache self.cache = RedisCache(REDIS_URL, prefix="mizan:test:") self.cache.clear() @@ -3370,7 +3370,7 @@ class RedisCachePurgeTests(TestCase): def setUp(self): if _SKIP_REDIS: self.skipTest(_SKIP_MSG) - from mizan.cache.backend import RedisCache + from mizan_core.cache.backend import RedisCache from mizan.cache import cache_put self.cache = RedisCache(REDIS_URL, prefix="mizan:test:") self.cache.clear() diff --git a/backends/mizan-django/src/mizan/cache/backend.py b/cores/mizan-python/src/mizan_core/cache/backend.py similarity index 100% rename from backends/mizan-django/src/mizan/cache/backend.py rename to cores/mizan-python/src/mizan_core/cache/backend.py