Sometitmes the RSS feed caching is not implemented, customizing the RSS cache for my favorite RSS feed.
- The RSS data contents is stored in the single key and data type.
- For each RSS data contents:
- The
lic_nttu_rss
is the key and its value is the RSS XML feed contents. - The
lic_nttu_rss_expired
is the key and its value is current timestamp for fetching the RSS contents.
- The
- For each RSS data contents:
- Here is the sample code to access the RSS feed and expired with Python Redis OM:
from redis_om import get_redis_connection
# Get the RSS feed
rss_contents = redis_conn.get('lic_nttu_rss')
# Get the RSS expired value
expired = redis_conn.get('lic_nttu_rss_expired')
- Python - 3.8+
- pip - 21.1.1+
- Cloning the repository with
git clone
command. - Running the
pip install -r requirements.txt
command. - Running the
flask run
to run the RSS Cache App in the development mode.
To make deploys work, you need to create free account on Redis Cloud