Cache Manager Functions (Windows CE 5.0)

Send Feedback

The following table shows the Cache Manager functions.

Programming element Description
CachedRead If the specified block is cached, this function copies data from the cache into a buffer.

If the specified block is not cached, this function reads the data from the disk and copies it into a buffer along with the cache.

CachedWrite This function, in the case of a write-through cache, writes data to the disk and the cache.

In the case of a write-back cache, this function writes data only to the cache and allows the lazy-writer thread to commit the data to the disk.

CacheIoControl This function sends a custom IOCTL to the cache.
CreateCache This function creates a cache.
DeleteCache This function deletes a cache.

This frees all memory allocated to the cache.

FlushCache This function commits dirty blocks in the cache to the disk.

This is only necessary for a write-back cache.

InvalidateCache This function invalidates the cached sectors in a sector list.

Invalidated sectors are not committed to disk first, even if they are dirty.

ResizeCache This function resizes a cache by reducing or expanding its size.
SyncCache This function updates the cache by reading from the disk for each cache block while maintaining the mapping between a cache block and a disk block.

See Also

Cache Manager Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.