SenseNet.ContentRepository.ApplicationCache.Invalidate C# (CSharp) Method

Invalidate() public method

public Invalidate ( string appTypeName, string path ) : void
appTypeName string
path string
return void
        public void Invalidate(string appTypeName, string path)
        {
            if (locked)
                return;
            Logger.WriteVerbose("ApplicationCache is invalidated.", Logger.EmptyCategoryList, new Dictionary<string, object> { { "AppTypeName", appTypeName }, { "Path", path } });
            var cachePath = RepositoryPath.Combine(PersistentAppCacheFolderPath, appTypeName);
            var cacheFile = Node.Load<ApplicationCacheFile>(cachePath);
            if (cacheFile != null)
            {
                locked = true;
                cacheFile.ForceDelete();
                locked = false;
            }
        }