caching in memory on server
- by zaharpopov
I want to write web app with client Javascript and back-end server (Python). Client needs data from server frequently in AJAX way. Data in DB, and expensive to load for each request.
However, in desktop app I would just load data from DB once to memory and then access it. In web app - the server code runs each time for request so I can't do it (each run has to load from DB to memory again). How can this work? Can a single process run on server or do I have to use something different here?
An example is like auto-complete here on stackoverflow for tags - how is it implemented in the server for fast caching/loading?