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.
Example: Websites with millions of users use Redis or Memcached to store frequent database queries.
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.
Example: A shopping cart on an e-commerce site that remembers selected items until checkout.
What kind of data does this system store in each type of cache?
Building Distributed Caching Is in progress..
Implimenting in AWS ElastiCache using 'ValKey' which is a cheaper fork of the open source 'Redis'.
I will eventually cache
Locations Organizations
SpecialStatuses
ManuallyEditedEventData
PageNotifications
ScraperRunLogs
ConsolodationRunLogs
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)