Example #1
0
    def _total_bytes(self):
        total_bytes = 0

        for key, item in cache.storage.values():
            bytes = total_size(item['value'])
            total_bytes += bytes

        return total_bytes
Example #2
0
    def cache(self):
        values = []

        total_bytes = 0

        for key, item in cache.storage.values():
            bytes = total_size(item['value'])
            total_bytes += bytes
            values.append((key, bytes, type(item['value']), item['updated']))

        return {
            'values': values,
            'size': cache.storage.size(),
            'total_bytes': total_bytes
        }