3 ms·
Redis can do far more than just caching. However for your specific use case, considering a typical MVC web app with RDBMS data storage, you would add a check a
by sidm83 6y ago
Redis can do far more than just caching.
However for your specific use case, considering a typical MVC web app with RDBMS data storage, you would add a check at the beginning of your Model method to return cached data if it exists, else go through the method execution and write the data to the cache just before returning it back to the controller. This way the cache would be 'warmed' on first call and data will be served directly from the cache (memory) next time till it is cleared, saving expensive disk I/O.