-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional caching? #14
Comments
Can you explain a little bit more about this? 😁 |
Yeap; if the js file is served by the view, it would be nice to have that response cached. With SPA's, caching this particular view is not a big problem, but with non-spa websites, it could quite help avoid unnecessary requests to the view. Something like:
Then jsglue could lookup if flask-cache is installed and use it if available. Another option would be to cache the view response with the http server cache. I'm unsure about which solution would fit best. Maybe having both options would be nice. |
Another approach would be to create an option to disable adding gluejs route. This way, the user could add a route to gluejs with caching enabled. |
@imaia is right on the money. I have a site that is an RPA "reduced page application", but still has some page loads... I chose to abandon JSGlue because of this. Also the nginx req limiter had to be raised just a tad to accomodate this JS or else it would get queued. If there was a way to cache the spun JS, I woulda liked to keep it. Its still a good idea.. just needs some tuning methinks. Good luck! |
An optional integration with flask-cache could do some wonders here.
The text was updated successfully, but these errors were encountered: