reddit-network-vis | network visualization of Reddit discussions | Data Visualization library
kandi X-RAY | reddit-network-vis Summary
kandi X-RAY | reddit-network-vis Summary
network visualization of Reddit discussions
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of reddit-network-vis
reddit-network-vis Key Features
reddit-network-vis Examples and Code Snippets
Community Discussions
Trending Discussions on reddit-network-vis
QUESTION
I'm trying to do a visualization app in js + python. My app works like this:
in browser I have a textbox where I introduce an url
I send that url to python using Flask
in python I take that url, I process it, and I create a JSON file
in js I take that JSON file and I display the result in browser
The problem I encounter: I introduce the url in browser, click submit, and it shows me the result, this is ok. But the next time when I introduce another url, it shows me the same result as the previous, if I introduce another url, still the same result. So the JSON file is somehow cached somewhere. To resolve this I have to delete everytime the old JSON file and rename the new one in python code.
My question is, where should I put this JSON file to prevent caching? Or is there another way?
I have this hierarchy of files:
...ANSWER
Answered 2017-Sep-09 at 00:55You have one file file.json
catering to multiple urls. This can only work if you are only dealing with one user at a time. I assume you're trying to cache the result, and for that you would need a different file for each url. A slightly better way would be to use an in-memory database like redis
for that.
But if all you want to do is busting the cache, then instead of calling file.json
in your ajax call, use file.json?
like file.json?t=
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install reddit-network-vis
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page