[Overview][Resource strings][Types][Classes][Index] |
Add a data element to the list.
Source position: cachecls.pp line 81
public function TCache.Add( |
AData: Pointer |
):Integer; |
AData |
|
Data pointer to add to the cache. |
Index at which item was added.
Add checks whether AData is already in the list. If so, the item is added to the top of the MRU list. If the item is not yet in the list, then the item is added to the list and placed at the top of the MRU list using the AddNew call.
The function returns the index at which the item was added.
If the maximum number of slots is reached, and a new item is being added, the least used item is dropped from the list.
|
Add a new item to the list. |
|
|
Find data pointer in the list |
|
|
Return index of a data pointer in the list. |
|
|
Indexed access to data items |
|
|
Most recent item slot. |
lazarus-ccr.sourceforge.net |