Skip to content

Commit

Permalink
Remove DictCache, which is unused (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtmckee authored Sep 24, 2024
1 parent c5fab0d commit 878e195
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions flask_compress/flask_compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@
from flask import after_this_request, current_app, request


class DictCache:

def __init__(self):
self.data = {}

def get(self, key):
return self.data.get(key)

def set(self, key, value):
self.data[key] = value


class Compress:
"""
The Compress object allows your application to use Flask-Compress.
Expand Down

1 comment on commit 878e195

@ECrosland
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was using DictCache in my project. Should I not have been?

Without DictCache, there doesn't seem to be a cache backend available, and so the feature that supports caching the compressed responses in memory isn't usable. (Granted, it's a simple interface and it won't be difficult for me to implement something like DictCache myself.)

Please sign in to comment.