ec_cache_find — Find a cache item determined by a
ec_cache_elt * **ec_cache_find** ( | cache, | |
| | key, | |
| | keylen
); | |
Find a cache item determined by a
key. If the element is found, its reference count will be incremented and the element returned to you.
The address of the cache. The following typedef applies to the
typedef struct ec_cache_head ec_cache_t;.
Identifies the entry in the cache. It will be copied into the “ec_cache_elt” structure.
The length of the key, in bytes.
Returns the address of the “ec_cache_elt” structure associated with the
NULL if no corresponding value to
key is found.
You are responsible for calling ec_cache_delref on this structure when you are finished using it. This is to ensure that the cache doesn’t cause it to be deleted and to ensure that allocated memory is released.
It is legal to call this function in any thread.