gtpa2m26 | Application Programming |
To delete a logical record cache, the application starts the deleteCache function, passing a pointer to the returned cacheToken value for the cache to be deleted as input. This delete occurs immediately although other applications may also be using the cache. Users of the cache will receive a CACHE_ERROR_TOKEN return code when they try to access the deleted cache.
If the cache is a processor shared cache, the connection to the CF cache structure is deleted. If this is the last processor using the CF cache structure in the CF, the structure is deleted. Otherwise, no other notification is sent to any other processor and no entries in their copy of the cache are affected. See TPF Database Reference for more information about CF cache structures.
See TPF C/C++ Language Support User's Guide for more information about the deleteCache function.
The following shows the function to delete a logical record cache:
long deleteCache( cacheTokenPtr cache_to_delete);
The following example shows how to delete a processor shared cache that was created previously.
deleteCache ( &myCacheShared ); /* addr of the token for the cache */ printf(" Shared_Cache deleted"); /* write message */ exit(0); /* and exit */
The following example shows how to a delete processor unique cache that was created previously.
deleteCache ( &myCacheUnique ); /* addr of the token for the cache */ printf("Unique_Cache deleted"); /* write message */ exit(0); /* and exit */