SenseNet.ContentRepository.Storage.DataBackingStore.CreateNodeHeadPathCacheKey C# (CSharp) Метод

CreateNodeHeadPathCacheKey() публичный статический Метод

public static CreateNodeHeadPathCacheKey ( string path ) : string
path string
Результат string
        public static string CreateNodeHeadPathCacheKey(string path)
        {
            return string.Concat(NODE_HEAD_PREFIX, path.ToLowerInvariant());
        }
        public static string CreateNodeHeadIdCacheKey(int nodeId)

Usage 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));
        }