A3EA
(Andy's) Ann Arbor Event Aggregator
All About Caching!
What is Caching? Caching is like keeping a small notepad next to your desk with answers to frequently asked questions,
so you don’t have to search through a big book every time you need them.
It makes things faster by storing frequently used data in a place that’s quick to access.
What kinds of caching does this website use?
Distributed Caching – Imagine a shared online document that multiple people can access.
This cache is stored across multiple servers and is useful for large-scale applications
where different machines need fast access to the same data.
Session-Level Caching – This is like keeping a sticky note on your desk while working.
The data is stored temporarily for a single user’s session and disappears when they log out or leave.
What kind of data does this system store in each type of cache?
Distributed Caching Implemented in AWS Elasticache using ValKey. (Cheaper fork of Redis)
Caches List for the dropdowns, things like: Locations, Organizations, SpecialStatuses, PageNotifications
Session-Level Caching – This system uses session-level caching to store user-specific data, such as:
Previously searched events
(this allows further filtering or re-searching without having to revist the database each time)
Values used to filter events
(this allows determining if new searches are subsets of previous searches,
ie. if we need to get data from the database or use the previous cache)