#region COPYRIGHT
//
//     THIS IS GENERATED BY TEMPLATE
//     
//     AUTHOR  :     ROYE
//     DATE       :     2010
//
//     COPYRIGHT (C) 2010, TIANXIAHOTEL TECHNOLOGIES CO., LTD. ALL RIGHTS RESERVED.
//
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Caching
{
    public interface ICache<TKey, TItem> : IEnumerable<TItem>
    {
        // Methods
        void Add(TKey key, TItem item);
        void Clear();
        bool ContainsKey(TKey key);
        void RemoveKey(TKey key);
        TItem Get(TKey key, Func<TItem> generator);
        TItem Get(TKey key, bool markAsHit, Func<TItem> generator);

        // Properties
        int Count { get; }
    }
}
