AgilityContentRepositories - Caching Issues
Hello! I have created helpers to use within my MVC views to return AgilityContentRepositories and have been running into caching issues, where after publishing the cache is not invalidated until the app pool refreshes.
I am doing this in the following way in my code:
public static List<Company> CompanyList(string rowFilter = "", string sort = "")
var data = new AgilityContentRepository<Company>("Companies").Items(rowFilter, sort);
return data?.ToList() ?? new List<SeCompany>();
And then within a cshtml view:
Do you have any ideas about why this method would return stale data in an MVC view and if this is correct to be doing?