'Returns the total size in bytes of the image cache.'

def get_cache_size(self):

    sizes = []
    for path in get_all_regular_files(self.base_dir):
        file_info = os.stat(path)
        sizes.append(file_info[stat.ST_SIZE])
    return sum(sizes)
