gtpc2m1fC/C++ Language Support User's Guide

deleteCache-Delete a Logical Record Cache

This function deletes a logical record cache from the processor.

Format

#include   <c$cach.h>
long       deleteCache( cacheToken *cache_to_release);

cache_to_release
The returned cache_token from the newCache function that defined the logical record cache.

Normal Return

CACHE_SUCCESS
The function is completed successfully.

Error Return

CACHE_ERROR_HANDLE
The cache_token provided for the cache_to_release parameter is not valid.

Programming Considerations

The delete occurs immediately and without regard for other applications that may also be using the cache.

Examples

The following example deletes the file system INODE cache.

#include <c$cach.h>
#include <i$glue.h>
 
    struct icontrol * contrl_ptr;    /* pointer file system control area */
 
/*  get pointer to file system control area                              */
 
    contrl_ptr = cinfc_fast_ss(CINFC_CMMZERO,
                  ecbptr()->ce1dbi );
 
/*  if using INODE cache, call to delete it */
 
    if (contrl_ptr->icontrol_icacheToken.token1 != 0)
         deleteCache(&contrl_ptr->icontrol_icacheToken);

Related Information