Created
August 5, 2025 10:24
-
-
Save ferdousulhaque/1c9fc5a27ea026dadc23c7fc2daa8230 to your computer and use it in GitHub Desktop.
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
| def getListProducts(): | |
| # Check in Cache | |
| getList = Cache.get('products') | |
| # If Cache-Hit miss then call Database | |
| if getList == False: | |
| # get from Database | |
| getList = ProductsModel.getAllinJson() | |
| # push to Cache | |
| Cache.set(getList, DAILY_24HR_TTL) | |
| return getList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment