summaryrefslogtreecommitdiffabout
path: root/cache.h
authorLars Hjemli <hjemli@gmail.com>2009-09-13 20:02:07 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-09-13 20:02:07 (UTC)
commit92f6940975f6771f3a08d497c02575ee5bdc79da (patch) (side-by-side diff)
treec1c538b24e50be3bf63356acf246cda76b91c519 /cache.h
parent5f12e45fe3338095916a444ff106dd9fc9991d84 (diff)
parentee554849ac7209fa8f7486327ec9f3b370e4c876 (diff)
downloadcgit-92f6940975f6771f3a08d497c02575ee5bdc79da.zip
cgit-92f6940975f6771f3a08d497c02575ee5bdc79da.tar.gz
cgit-92f6940975f6771f3a08d497c02575ee5bdc79da.tar.bz2
Merge branch 'lh/repo-scan'
Diffstat (limited to 'cache.h') (more/less context) (show whitespace changes)
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 66cc41f..ac9276b 100644
--- a/cache.h
+++ b/cache.h
@@ -1,35 +1,37 @@
/*
* Since git has it's own cache.h which we include,
* lets test on CGIT_CACHE_H to avoid confusion
*/
#ifndef CGIT_CACHE_H
#define CGIT_CACHE_H
typedef void (*cache_fill_fn)(void *cbdata);
/* Print cached content to stdout, generate the content if necessary.
*
* Parameters
* size max number of cache files
* path directory used to store cache files
* key the key used to lookup cache files
* ttl max cache time in seconds for this key
* fn content generator function for this key
* cbdata user-supplied data to the content generator function
*
* Return value
* 0 indicates success, everyting else is an error
*/
extern int cache_process(int size, const char *path, const char *key, int ttl,
cache_fill_fn fn, void *cbdata);
/* List info about all cache entries on stdout */
extern int cache_ls(const char *path);
/* Print a message to stdout */
extern void cache_log(const char *format, ...);
+extern unsigned long hash_str(const char *str);
+
#endif /* CGIT_CACHE_H */