Beispiel #1
0
        public bool Lock(string key, TimeSpan lockTimeout)
        {
            if (!Loaded)
            {
                return(false);
            }

            bool       success = true;
            LockHandle handle;

            try
            {
                success = cache.Lock(key, lockTimeout, out handle);
            }
            catch (Exception ex)
            {
                return(false);
            }
            return(success);
        }