Source/NFX/DataAccess/Cache/Table.cs
/// <summary>
/// Retrieves an item from this table by key where item age is less or equal to requested, or null if it does not exist
/// </summary>
/// <param name="key">Item key</param>
/// <param name="ageSec">Age of item in seconds, or 0 for any age</param>
Retrieves an item from this table by key where item age is less or equal to requested, or null if it does not exist
Retrieves an item from this table by key where item age is less or equal to requested or null if it does not exist
public CacheRec Get(ulong key, int ageSec = 0)
            {
                var result = _Get(key, ageSec);
                if (result!=null)
                {
                    Interlocked.Increment(ref stat_HitCount);
                   #pragma warning disable 420
                    Interlocked.Increment(ref result.m_HitCount);
                   #pragma warning restore 420
                }
                else
                    Interlocked.Increment(ref stat_MissCount);
                return result;
            }
public CacheRec Get ( ulong key , int ageSec = 0 ) { var result = _Get ( key , ageSec ) ; if ( result != null ) { Interlocked . Increment ( ref stat_HitCount ) ; pragma warning disable 420 Interlocked . Increment ( ref result . m_HitCount ) ; pragma warning restore 420 } else Interlocked . Increment ( ref stat_MissCount ) ; return result ; }
Retrieves an item from this table by key where item age is less or equal to requested, or null if it does not exist
Retrieves an item from this table by key where item age is less or equal to requested or null if it does not exist
key
ulong
None
ageSec
int
Age of item in seconds, or 0 for any age
Age of item in seconds or 0 for any age