Beispiel #1
0
    def test_cache_invalidation(self):
        """invalidate has increased valid version number"""
        db_version = CacheVersion.objects.get(cache=self.cache_name).version
        cachebuster.invalidate(self.cache_name)

        new_version = cachebuster.get_version(self.cache_name)
        new_db_version = CacheVersion.objects.get(cache=self.cache_name)
        new_db_version = new_db_version.version

        self.assertEqual(new_version, 1)
        self.assertEqual(new_db_version, 1)
        self.assertEqual(new_version, new_db_version)
        self.assertFalse(cachebuster.is_valid(self.cache_name, db_version))
        self.assertTrue(cachebuster.is_valid(self.cache_name, new_db_version))
Beispiel #2
0
def invalidate():
    cachebuster.invalidate(ACL_CACHEBUSTER)
Beispiel #3
0
 def invalidate_cache(self):
     cachebuster.invalidate(BAN_CACHEBUSTER)
Beispiel #4
0
 def invalidate_cache(self):
     cachebuster.invalidate(BAN_CACHEBUSTER)
Beispiel #5
0
def invalidate():
    cb.invalidate(ACL_CACHE_NAME)
Beispiel #6
0
def invalidate():
    cb.invalidate(ACL_CACHE_NAME)