ClearCache Method

The ClearCache method allows you clear a set of search results from cache based on a specified key. Use this method if you want to clear cache but you are not saving a record.

ClearCache call in C#

using (Agility_UGC_API_WCFClient client = DataServiceUtil.GetUGCClient())
{
     DataServiceAuthorization auth =
     DataServiceUtil.GetDataServiceAuthorization(-1);
     //TODO: generate this key based on realistic parameters.
     string cacheKey = "MyCustomCacheKey"; 
     client.ClearCache(auth, cacheKey);
}
                    

ClearCache call in JavaScript

//if the data should be cached based on a custom key...
var cacheKey= "MyCustomCacheKey";
 
//invoke the ClearCache method, which is asynchronous, and has a callback
Agility.UGC.API.ClearCache(cacheKey, function(data) {  
     
    if (data.ResponseType != Agility.UGC.API.ResponseType.OK) {
        //error occurred
        alert("An error occurred: " + data.Message);           
    } else {
        //the cache was cleared successfully...
    }
}
                    

LOGIN

Log in with your Agility username and password or
register for the site




Log In

REGISTER












Register

FORGOT PASSWORD