This project is read-only.



There are the following examples:-

Getting Started

The examples are provided as part of the file which includes the following WSPs :-

  1. ITSP.SharePoint.CacheRefresh.wsp
  2. ITSP.SharePoint.CacheRefresh.Examples.wsp

Installation of Framework

To install and configure the Cache Refresh Framework see Deploying the SharePoint Cache Refresh Framework.

Installation of the Examples

The Examples are contained in the in a SharePoint solution file named ITSP.SharePoint.CacheRefresh.Examples.wsp
Install the Solution using the following instructions:-

  • Copy the files into a folder on your Development SharePoint environment
    • E.g c:\install\spcacherefresh\
  • Start the SharePoint 2010 Management Shell
  • Using the Management Console type in the following Powershell
  • Add-SPSolution –LiteralPath c:\install\spcacherefresh\ITSP.SharePoint.CacheRefresh.Examples.wsp
  • Install-SPSolution –Identity ITSP.SharePoint.CacheRefresh.Examples.wsp –GACDeployment
  • You can check on the installation by doing the following:-
    • $solution = Get-SPSolution ITSP.SharePoint.CacheRefresh.Examples.wsp
    • $solution.LastOperationDetails
    • When this says MACHINE NAME : Operation Successfully Completed the solution is installed

The next step presumes that you have already activated the Cache refresh feature on your development web application. If you haven’t done this then use the following:-

  • From the SharePoint 2010 Management Shell
  • Enable-SPFeature –Identity ITSP.SharePoint.CacheRefresh_CacheConfiguration –Url http://sharepointurl
  • This will create the Cache Configuration List.

Once you have the Cache Configuration features enabled on your Web Application

  • Browse to the Web Application root site in Internet Explorer
  • Click Site Actions->Site Settings
  • Under Site Collection Administration Settings
    • Click Cache Configuration Settings
  • The Cache Configuration List will be displayed
  • Add a new SharePoint List Item
    • Name: Example
    • Dependency Path: “c:\program files\spcacherefresh\example.config
    • Cache Refresh: 5
    • Cache Enabled True
    • Save the List Item
  • Create a folder on your development machine in “c:\program files\” called spcacherefresh. This will give you a new folder in “c:\program files\spcacherefresh\”
  • This folder will be accessed by the SharePoint Timer Job and needs to have permissions applied to it. The account that you are using for your timer job will need to be given read/write permissions to the folder.

Once the permissions have been applied then go back to PowerShell

  • Run Update-ITSPCacheConfigTimerJobs
    • This will read the Cache Configuration SharePoint list and create a new Timer job for our Example entry that we just configured
  • Run the Timer Job using Central Administration
    • Start Central Admin
    • Click on Monitoring
    • Click on Review Timer Job Status
    • Look for a Timer Job with the name “Cache Refresh Timer Job (Example)”
    • Click on its name
    • Click Run Now
  • This will create a file called example.config in the c:\program files\spcacherefresh\ folder we created earlier

You are now ready to Run the Example

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.

Last edited Jul 25, 2012 at 10:38 PM by Quannum, version 13


No comments yet.