summaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
Commit message (Expand)AuthorAge
* CGIT-0.9.1v0.9.1Jason A. Donenfeld2012-11-15
* Makefile: get snapshots from githubFerry Huberts2012-11-04
* Makefile: remove tags fileJamie Couture2012-10-31
* Makefile: Support OpenBSD just like FreeBSDJason A. Do
/*
 * 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 */
+0200'>2010-09-27 |\ \ \ | |/ / |/| / | |/ | * CGIT 0.8.3.4v0.8.3.4Lars Hjemli2010-09-27 | * Use GIT-1.7.3Lars Hjemli2010-09-27 * | Merge branch 'ml/bugfix'Lars Hjemli2010-09-19 |\ \ | * | fix errors in printf-style format stringsMark Lodato2010-09-04 * | | Use GIT-1.7.3Lars Hjemli2010-09-19 |/ / * | Use GIT-1.7.2.2Lars Hjemli2010-08-22 * | Merge branch 'stable'Lars Hjemli2010-08-03 |\| | * CGIT 0.8.3.3v0.8.3.3Lars Hjemli2010-08-03 * | Makefile: do not include dependency-file on `make clean`Lynn Lin2010-07-22 * | Merge branch 'stable'Lars Hjemli2010-06-19 |\| | * CGIT 0.8.3.2v0.8.3.2Lars Hjemli2010-06-19 * | Use GIT-1.7.0Lars Hjemli2010-02-27 * | Merge branch 'stable'Lars Hjemli2009-12-12 |\| | * CGIT 0.8.3.1v0.8.3.1Lars Hjemli2009-12-12 * | Merge branch 'ro/ssdiff'Lars Hjemli2009-12-08 |\ \ | * | First version of side-by-side diff.Ragnar Ouchterlony2009-09-16 | |/ * / Add NO_OPENSSL optionMikhail Gusarov2009-11-07 |/ * CGIT 0.8.3v0.8.3Lars Hjemli2009-09-13 * Merge branch 'stable'Lars Hjemli2009-09-13 |\ | * CGIT 0.8.2.2v0.8.2.2Lars Hjemli2009-09-13 * | Use GIT-1.6.4.3Lars Hjemli2009-09-13 * | Use GIT-1.6.3.4Lars Hjemli2009-08-16