Example 1: Feature Receiver adds data to cache

Before we run the example, let’s change a few diagnostic settings. This will ensure that you are able to see the cache refresh process in action.

One of the problems with this solution is that it is difficult to see what is going on so let use the SharePoint ULS Logs!
Make sure you have ULSViewer from the Microsoft site http://archive.msdn.microsoft.com/ULSViewer

  • From the Central Admin
  • Click Monitoring
  • Click Modify Diagnostic Settings
  • Find iThink SharePoint in the list
  • Expand, click the General Checkbox
    • Scroll to the bottom and choose Verbose from the Trace Logs
    • Click Ok


Now that you have the diagnostic settings turned up, fire up ULS Viewer

  • Use File->open->ULS
  • This will start the logging session and will see that things are being added to the logs
  • Browse to the Web Application
  • Click Site Actions->Site Settings
  • Click on Manage Site Collection Features
  • Activate the Example Cache Refresh Cache Object feature 
  • In 5 minutes you will see in the logs that the timer job is run and the cache will be flushed you should see another message appear saying that the object has been deleted.


 

ULS Viewer Showing Cache Refresh Events

CacheRefreshULSLog

Last edited Jul 25, 2012 at 9:33 PM by Quannum, version 10

Comments

No comments yet.