Example #1
0
    def get(self):
        response = cache.status_message()
        cache_keys = cache.keys("")
        if cache_keys:
            response += "<br>Cached keys:<br>"
            response += "<br>".join(cache_keys)
        else:
            response += "<br>There are no cached keys"

        self.write(response)
Example #2
0
    def get(self):
        response = cache.status_message()
        cache_keys = cache.keys("")
        if cache_keys:
            response += "<br>Cached keys:<br>"
            response += "<br>".join(cache_keys)
        else:
            response += "<br>There are no cached keys"

        self.write(response)
 def test_keys(self):
     response = keys("key_xubiru")
     self.assertEqual(sorted(response), ["key_xubiru", "key_xubiru2"])
 def test_keys(self):
     response = keys("key_xubiru")
     self.assertEqual(sorted(response), ["key_xubiru", "key_xubiru2"])
Example #5
0
 def test_flushall_after_import_cache(self):
     cache.create('any_key', 1)
     self.assertEqual(cache.retrieve('any_key'), 1)
     cache.flushall()
     self.assertEqual(cache.keys('*'), [])
 def test_flushall_after_import_cache(self):
     cache.create('any_key', 1)
     self.assertEqual(cache.retrieve('any_key'), 1)
     cache.flushall()
     self.assertEqual(cache.keys('*'), [])