[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2

FrcaCacheCreate Subroutine


Creates a cache instance within the scope of a Fast Response Cache Accelerator (FRCA) instance.


FRCA Library (libfrca.a)


#include <frca.h>
int32_t FrcaCacheCreate ( CacheHandle, FrcaHandle, CacheSpec);
int32_t * CacheHandle;
int32_t FrcaHandle;
frca_cache_create_t * CacheSpec;


The FrcaCacheCreate subroutine creates a cache instance for an FRCA instance that has already been configured. Multiple caches can be created for an FRCA instance. Cache handles are unique only within the scope of the FRCA instance.


CacheHandle Returns a handle that is required by the other cache-related subroutines of the FRCA API to refer to the newly created FRCA cache instance.
FrcaHandle Identifies the FRCA instance for which the cache is created.
CacheSpec Points to a frca_ctrl_create_t structure, which specifies the characteristics of the cache to be created. The structure contains the following members:
uint32_t cacheType;
uint32_t nMaxEntries;

Note: Structure members do not necessarily appear in this order.

Specifies the type of the cache instance. This field must be set to FCTRL_SERVERTYPE_HTTP.

Specifies the maximum number of entries allowed for the cache instance.

Return Values

0 The subroutine completed successfully.
-1 The subroutine failed. The global variable errno is set to indicate the specific type of error.

Error Codes

EINVAL The CacheHandle or the CacheSpec parameter is zero or the CacheSpec parameter is not of the correct type FCTRL_CACHETYPE_HTTP.
EFAULT The CacheHandle or the CacheSpec point to an invalid address.
ENOENT The FrcaHandle parameter is invalid.

Related Information

The FrcaCacheDelete subroutine, the FrcaCacheLoadFile subroutine, the FrcaCacheUnloadFile subroutine, the FrcaCtrlCreate subroutine, the FrcaCtrlDelete subroutine, the FrcaCtrlLog subroutine, the FrcaCtrlStart subroutine, the FrcaCtrlStop subroutine.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]