Example #1
0
        public DbCache(IDbCacheCore <K, T, I> core)
        {
            m_Core = core;
            m_Core.FlushEntities += (s, e) => Flush();

            m_Index = new DbIndex <K, T>(core);
            m_Info  = new Dictionary <K, I>();

            Add(m_Core.RetrieveInitialEntities());
        }
Example #2
0
 public static IDbCache <K, T, I> CreateCache <K, T, I>(IDbCacheCore <K, T, I> core)
     where T : class, IDbEntity <T>
 {
     return(new DbCache <K, T, I>(core));
 }