def get(self):
    self.cache = cache.Cache()
    # test deleting a cache object
    del self.cache["sampleStr"]
    # set a string
    if not "sampleStr" in self.cache:
        self.cache["sampleStr"] = "This is a string passed to the cache"
    # store an object
    if not "sampleObj" in self.cache:
        self.cache["sampleObj"] = ["this was set up as a list to test object caching"]
    keyname = 'dynamic' + 'key'
    if not keyname in self.cache:
        self.cache[keyname] = 'this is a dynamically created keyname'
    self.memcacheStats = memcache.get_stats()
    template_values = {
        'cacheItemStr': self.cache["sampleStr"],
        'cacheItemObj': self.cache["sampleObj"],
        'dynamickey': self.cache["dynamickey"],
        'memcacheStats': self.memcacheStats,
    }
    path = os.path.join(os.path.dirname(__file__), 'templates/cache-new.html')
    self.response.out.write(template.render(path, template_values))
dataset/ETHPy150Open joerussbowman/gaeutilities/main.py/CachePage.get/original