Caching

From ETS

Jump to:navigation, search

To improve application response times caching is used. Perl Cache Modules are used to implement this portion of the application as outlined below.

Showtree Cache

Caches latest downloaded showtree xml document on disk.

Having the showtree xml document in cache avoids parsing the entire xml document into memory every time an xql query needs to be satisfied, a time consuming and resource intensive process.

Users Cache

Caches user data to disk via hashes for quick lookups. This avoids repeated xql queries and ldap calls improving response time. Cache is made up of two hashes, each using a user's Penn State Access Id as their keys. The Penn State Access Id is accessible from each page via the REMOTE_USER var. Details for the two hashes are listed now:

Cache Invalidation clears the courselisting and entitlements hashes of all user data key value pairs. Clearing occurs via the showtree.cgi script only after the showtree cron job has run and a new xml document has been downloaded, parsed, and placed into cache.

Cache Additions are made via the user abstraction layer the first time a user visits the dashboard. An xql query and ldap lookup are performed and the results are added to the courselisting and entitlements hashes.

Navigation
Toolbox