Ejemplo n.º 1
0
        // ------ Methods that are implemented for Table interface ------

        public override DataObject GetValue(int column, long row)
        {
            // [ FUNCTION TABLE CACHING NOW USES THE GLOBAL CELL CACHING MECHANISM ]
            // Check if in the cache,
            ICellCache cache = Database.CellCache;

            // Is the column worth caching, and is caching enabled?
            if (expInfo[column] == 0 && cache != null)
            {
                DataObject cell = cache.Get(uniqueId, row, column);
                if (cell != null)
                {
                    // In the cache so return the cell.
                    return(cell);
                }

                // Not in the cache so calculate the value and WriteByte it in the cache.
                cell = CalcValue(column, row, cache);
                return(cell);
            }

            // Caching is not enabled
            return(CalcValue(column, row, null));
        }