flask-cache Questions

6

Solved

How do I use Flask-Cache @cache.cached() decorator with Flask-Restful? For example, I have a class Foo inherited from Resource, and Foo has get, post, put, and delete methods. How can I can inval...

1

Solved

The UWSGI is connected to the flask app per UNIX-Socket: NGINX (LISTEN TO PORT 80) <-> UWSGI (LISTER PER UNIX-SOCKER) <-> FLASK-APP I have initalized a uwsgi cache to handle global data...
Lyingin asked 30/8, 2018 at 12:7

5

Solved

I made a change on one of the .js files that I use and no matter what I do, flask insists on picking up, from memory cache, the last version of the file, without the change. To clarify, I have the...
Diahann asked 14/12, 2016 at 14:3

2

I'm using the Flask Cache plugin with Redis as backend to cache my API response. Say I have APIs to get users and create user like this: /api/users?page=1 GET /api/users POST The GET result will...
Psychologist asked 19/4, 2016 at 4:17

3

Solved

I am using Flask with Celery and I am trying to lock a specific task so that it can only be run one at a time. In the celery docs it gives a example of doing this Celery docs, Ensuring a task is on...
Melosa asked 27/12, 2018 at 20:30

4

Solved

flask_cache.Cache.memoize not working with flask_restful.Resource Here is sample code: from flask import Flask, request, jsonify from flask_restful import Resource, Api from flask_cache import Ca...
Copulate asked 10/3, 2017 at 15:24

2

Solved

I am using Flask cache in my API in python. Currently I am using the decorator @app.cache.memoize(cache_memoize_value) and I flush it by calling app.cache.delete_memoized(view) The problem is tha...
Vishnu asked 23/3, 2016 at 13:49

1

I had this. @login_manager.user_loader def load_user(id=None): return User.query.get(id) It was working fine until I introduced Flask-Principal. @identity_loaded.connect_via(app) def on_identi...
Dietary asked 22/11, 2014 at 14:15

2

Solved

In the Flask-Cache documentation all the examples use a finite timeout. I'd like to never refresh the cache while the app is running. Is this possible, and if so how do I do it?
Kikuyu asked 30/7, 2013 at 5:8

1

Solved

How can I store simple key value pairs with Flask Cache? Something like this: cache.set('key', 'some value') cache.get('key') Now I only store a function's return value using the cache.cached() ...
Towle asked 16/10, 2015 at 7:59

1

Solved

I followed a tutorial of Flask-Cache and tried to implement it myself. Given the following example, why would Flask not cache the time? from flask import Flask import time app = Flask(__name__) c...
Scarper asked 6/10, 2015 at 17:2

1

Solved

Im using the memcached module on AWS Elasticache in my python Flask app (with Flask-Cache) When i try to set a file that is less than 1MB i need to repeatedly access to the cache, i have no issue...

0

I am scratching my head on this one. I have a Flask App w/ Flask-Cache and SqlAlchemy: app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql+pg8000://[Redacted] cache = Cache(...
Elinaelinor asked 10/2, 2015 at 20:44

2

Solved

I have a Flask app that takes parameters from a web form, queries a DB with SQL Alchemy and returns Jinja-generated HTML showing a table with the results. I want to cache the calls to the DB. I loo...
Possession asked 5/7, 2014 at 18:0

1

Solved

I meet a problem while using Flask-Cache. I need to make caching on need basis, by defining a configuration variable which user can set for enable or disable caching. I'm using Flask-Cache for cac...
Icken asked 3/1, 2014 at 9:21
1

© 2022 - 2024 — McMap. All rights reserved.