#ifndef FILE_CACHE_H
#define FILE_CACHE_H
/* Create a new file cache. It works very much like file-backed mmap()ed
memory, but it works more nicely with remote filesystems (no SIGBUS). */
/* Destroy the cache and set cache pointer to NULL. */
/* Change cached file descriptor. Invalidates the whole cache. */
/* Change the memory allocated for the cache. This can be used to immediately
set the maximum size so there's no need to grow the memory area with
possibly slow copying. */
/* Read data from file, returns how many bytes was actually read or -1 if
error occurred. */
/* Returns pointer to beginning of cached file. Only parts of the returned
memory that are valid are the ones that have been file_cache_read().
Note that the pointer may become invalid after calling file_cache_read(). */
/* Update cached memory area. Mark fully written pages as cached. */
/* Invalidate cached memory area. It will be read again next time it's tried
to be accessed. */
#endif