コード例 #1
0
 private static void InvalidateCacheForPath(string path)
 {
     var extension = System.IO.Path.GetExtension(path);
     if (extension == ".js" || extension == ".css")
     {
         // Sending a message which'll tell everyone to clean their cache
         var action = new BundleCacheInvalidatorDistributedAction(path);
         action.Execute();
     }
 }
コード例 #2
0
        private static void InvalidateCacheForPath(string path, bool ignoreExtension = false)
        {
            var extension = System.IO.Path.GetExtension(path);

            if (ignoreExtension || extension == ".js" || extension == ".css")
            {
                // Sending a message which'll tell everyone to clean their cache
                var action = new BundleCacheInvalidatorDistributedAction(path);
                action.Execute();
            }
        }