Your SlideShare is downloading. ×
0

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Squiz IUC 2010 - 3.4 Open Discussion

2,281

Published on

Squiz International User Conference 2010

Squiz International User Conference 2010

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,281
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Squiz Question Time!
  • 2. @joel_a_smith: Page 1 Bodycopy: <script type="text/javascript"> $(document).ready(function(){ pageTracker._trackPageview('/myform/page1'); }); </script> Thankyou Bodycopy: <script type="text/javascript"> $(document).ready(function(){ pageTracker._trackPageview('/myform/submit'); }); </script>
  • 3. Caching and Matrix A crash course (not for the faint hearted)
  • 4. A Common Server/Proxy/Internet architecture Squid/Proxy Matrix Caching Caching Squid/Proxy Caching Browser Caching
  • 5. Matrix Cache Avoids Matrix having to regenerate page contents each hit Configured by Matrix Cache setting in Cache Manager and Header settings in System Configuration Squid/Proxy Cache (Reverse Proxy) Prevents hits reaching Matrix Configured by browser cache setting in Cache Manager (and proxy settings) Squid/Proxy Cache Prevents requests travelling via the Internet Configured by browser cache setting in Cache Manager (and proxy settings) Browser Cache Prevents requests being sent by the browser Configured by browser cache setting in Cache Manager (and browser settings)
  • 6. Pulling apart the RSS Question Where are the points of caching? The RSS Data Source asset itself The asset listing formatting the information from the feed The page nesting the asset listing for display to the public (?) What are the complications? Asset updated trigger event not suitable for RSS feeds
  • 7. Pulling apart the RSS Question What tools do we have at our disposal? Default Cache Settings in Cache manager Type-specific Cache Settings in Cache manager Asset-specific Cache Settings in Cache manager Clear Matrix cache trigger action Clear Squid cache trigger action Clear Matrix cache tool Clear Squid cache tool
  • 8. Defining our constraints What delay can we tolerate? This is a business decision and must be made in line with policies and agreements How much load can our server handle? This is a technical decision and must take into account traffic, page generation complexity, and server specs How long does it take to collect the RSS feed? This will influence how frequently we try to refresh the feed
  • 9. 4 Options Disable Caching altogether Modify Caching settings for all assets involved in feed delivery Use JavaScript magic to populate a html div after page load Use an external script to monitor the RSS feed and send clear cache requests
  • 10. Modifying the caching for appropriate assets Assumptions: The RSS feed is only ever called by a particular asset listing The asset listing is not nested in another page (if it is, we'll also need to modify the caching time for that page) 2 minute update time is decided to be acceptable The server hardware can sustain the additional load involved in retrieving the rss feed and regenerating the asset listing every 2 minutes, above the standard load
  • 11. Modifying the caching for appropriate assets Use the Root Node Specific cache settings to set the default cache time for the RSS Data Source asset to <2mins Use the Root Node Specific cache settings to set the default and browser cache time for the Asset Listing page to 2 minutes (120s)
  • 12. Using JavaScript magic Assumption - the asset listing is nested in another page and is never called directly (Asset listing does not have a webpath? Type 2 linked?) Assumption - 2 minutes time to update is acceptable Set cache expiry times as per previous example Add JavaScript onLoad to populate the appropriate div using the content of the asset listing
  • 13. Using an external script Script must do the following: Collect the RSS feed content, compare it with a saved copy If the copy is different (or does not exist) replace the saved copy and: Send _recache requests for the appropriate assets (clears the Matrix cache) Send requests for the appropriate content with http headers: Pragma: no-cache Cache-Control: no-cache (clears the Squid/Proxy cache)
  • 14. (See attached WCAG2 Presentation)

×