Contents tagged with GetSlot

  • Simplest cachinng explanation

    Hello everybody,

    today I want to give one more explanation of how to use caching and slots for caching purposes. Also there are plenty of articles on the subject,  I want to give one more with simplest recipe. So, if you need to cache something, you'll need to follow this procedure:

    declare you class as something that inherits IPrefetchable

    Create some placeholder in your class for storing items in the cache

    Implement Prefetch

    Implement GetSlot

    Take a look on the code below, how it can be done:

    public class ArTranFetcher : IPrefetchable

    {

    private List<ARTran> _arTranList = new List<ARTran>();

    public void Prefetch()

    {

    _configurableList = new List<ARTran>(); … more