Свойство | Type | Description | |
---|---|---|---|
Debug | bool |
Свойство | Type | Description |
---|
Méthode | Description | |
---|---|---|
AddReplace ( string key, object val ) : bool |
Add or replace a key's value in the cache.
|
|
Clear ( ) : void |
Clear the cache.
|
|
Count ( ) : int |
Retrieve the current number of entries in the cache.
|
|
FirstUsed ( ) : string |
Retrieve the key of the first used entry in the cache.
|
|
Get ( string key ) : object |
Retrieve a key's value from the cache.
|
|
LRUCache ( int capacity, int evictCount, bool debug ) : System |
Initialize the cache.
|
|
LastUsed ( ) : string |
Retrieve the key of the last used entry in the cache.
|
|
Newest ( ) : string |
Retrieve the key of the newest entry in the cache.
|
|
Oldest ( ) : string |
Retrieve the key of the oldest entry in the cache.
|
|
Remove ( string key ) : bool |
Remove a key from the cache.
|
public AddReplace ( string key, object val ) : bool | ||
key | string | The key. |
val | object | The value associated with the key. |
Résultat | bool |
public Get ( string key ) : object | ||
key | string | The key associated with the data you wish to retrieve. |
Résultat | object |
public LRUCache ( int capacity, int evictCount, bool debug ) : System | ||
capacity | int | Maximum number of entries. |
evictCount | int | Number to evict when capacity is reached. |
debug | bool | Enable or disable console debugging. |
Résultat | System |