cache.h 744 B

1234567891011121314151617181920212223
  1. /*
  2. Caching file system proxy
  3. Copyright (C) 2004 Miklos Szeredi <miklos@szeredi.hu>
  4. This program can be distributed under the terms of the GNU GPL.
  5. See the file COPYING.
  6. */
  7. #include <fuse.h>
  8. #include <fuse_opt.h>
  9. #define DEFAULT_CACHE_TIMEOUT_SECS 20
  10. #define DEFAULT_MAX_CACHE_SIZE 10000
  11. #define DEFAULT_CACHE_CLEAN_INTERVAL_SECS 60
  12. #define DEFAULT_MIN_CACHE_CLEAN_INTERVAL_SECS 5
  13. void cache_add_link(const char *path, const char *link, size_t size);
  14. struct fuse_operations *cache_wrap(struct fuse_operations *oper);
  15. int cache_parse_options(struct fuse_args *args);
  16. void cache_add_attr(const char *path, const struct stat *stbuf, uint64_t wrctr);
  17. void cache_invalidate(const char *path);
  18. uint64_t cache_get_write_ctr(void);