An API to serve up RSS metadata for podcasts in database. All info (including the podcast basic info and podcast episodes) will be added to a database the API has access to. There can be multiple podcasts and multiple episodes for each podcast.
RSS data will be compliant with Apple Podcasts and Spotify Podcasts.
Info on Apple Podcast compliance
To speed up read queries, an L2 cache is being used when reading from the database.
In summary, the following need to be done in order to achieve L2 caching:
Note: L2 cache is only desirable if there are far more reads than there are writes to a particular DB, else the Cache might be counter-productive.
Limitations: L2 cache is a local cache, meaning any updates done to DB from outside the application won't invalidate that field in the cache. If you want to keep cache in sync, minimize writes outside of App instance. You can also evict the cache using sessionFactory.cache.evictAll()
- Setup dependencies -
org.hibernate.orm:hibernate-jcache
andorg.hibernate.orm:hibernate-jcache
are needed. - Enable L2 cache in application props file
- Annotate the POJO/Entity object with @Cacheable