This project is read-only.

Setting Cache Settings

To set cache setting, you will need to do the following, during rapid entity configuration factory :

            string connectionString = ...;
            IConfiguration configurationFactory = ConfigurationFactory.GetInstance(connectionString);

            configurationFactory.CacheSettings(10, 1000);

This snippet configurationFactory.CacheSettings(10, 1000); sets the stay alive minutes of the cached objects to 10 munites and the cache size to 1000. This means all internally cached object will stay active in the cache for ten minutes before the Rapid Garbage collector removes the entity from the cache. Cache size on the other hand is to set the amount of objects that can live in the cache. If the size is full and an entity needs to be cached, the Rapid GC will look for objects that are about to be garbage collected and swap their place with the new object, the swapped object will be given a temporary space and will be promoted/removed the next time the Rapid GC runs.

Rapid ORM makes use of transactional cache and shared cache. The transactional cache is what the entity (Domain object) uses to self track themselves. Entities need to know about what was their last state/data before set operation on a property, and entity have to know what is the present state/data. The goal behind self tracking can be found here Self Tracking Entities.

Share cache :

ORM framework need to do some persistent caching internaly to boost your application throughput. There may be a degradation of application performance when and if we allow the same data (Entity) to go through the same life cycle everytime it is needed.

Scenario :

Last edited Feb 23, 2010 at 3:09 PM by ahmedsalako, version 3


No comments yet.