Skip to content

Commit

Permalink
👀 Cache Was the Real Culprit (ig)
Browse files Browse the repository at this point in the history
- Remove cache again !!!!!!!!!!!
  • Loading branch information
CheapNightbot committed Sep 11, 2024
1 parent 73119f0 commit 0c19b3c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
request,
url_for,
)
from flask_caching import Cache
from flask_cors import CORS
from flask_limiter import Limiter, RequestLimit
from flask_limiter.util import get_remote_address
Expand All @@ -28,7 +27,6 @@

app = Flask(__name__)
api = Api(app)
cache = Cache(app, config={"CACHE_TYPE": "simple"})
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})


Expand All @@ -53,7 +51,6 @@ def is_valid_sting(string):

class Yutify(Resource):
@limiter.limit("60 per minute")
@cache.cached(timeout=3600)
def get(self, artist, song):
artist = artist.strip()
song = song.strip()
Expand Down Expand Up @@ -92,13 +89,11 @@ def get(self, artist, song):


@app.route("/")
@cache.cached(timeout=60)
def index():
return render_template("index.html")


@app.route("/yutify")
@cache.cached(timeout=60)
def yutify_me():
artist = request.args.get("artist").strip()
song = request.args.get("song").strip()
Expand Down Expand Up @@ -142,7 +137,6 @@ def yutify_me():


@app.route("/docs")
@cache.cached(timeout=60)
def docs():
return render_template("docs.html")

Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
aniso8601==9.0.1
async-timeout==4.0.3
blinker==1.8.2
cachelib==0.9.0
certifi==2024.8.30
charset-normalizer==3.3.2
click==8.1.7
Deprecated==1.2.14
Flask==3.0.3
Flask-Caching==2.3.0
Flask-Cors==5.0.0
Flask-Limiter==3.8.0
Flask-RESTful==0.3.10
Expand Down

0 comments on commit 0c19b3c

Please sign in to comment.