-
-
Save ktpm489/8130401287dfd2f0571dadf0fb2a4b91 to your computer and use it in GitHub Desktop.
Initializing cache service in feeds model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initializing cache service in feeds model | |
import DB from '../db'; | |
import CacheService from '../cache.service'; | |
const ttl = 60 * 60 * 1; // cache for 1 Hour | |
const cache = new CacheService(ttl); // Create a new cache service instance | |
const FeedModel = { | |
... | |
}; | |
export default FeedModel; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment