CreateNodeHeadPathCacheKey() public static method

public static CreateNodeHeadPathCacheKey ( string path ) : string
path string
return string
Example #1
0
        internal static bool NodeExists(string path)
        {
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            if (!CanExistInDatabase(path))
            {
                return(false);
            }

            // Look at the cache first
            var pathKey = DataBackingStore.CreateNodeHeadPathCacheKey(path);

            if (DistributedApplication.Cache.Get(pathKey) as NodeHead != null)
            {
                return(true);
            }

            // If it wasn't in the cache, check the database
            return(DataProvider.NodeExists(path));
        }