blob: 56f8c98e2445f036b1c3897dce976f419372cb61 [file] [log] [blame]
Jeff Kinga941d5e2010-04-01 20:07:40 -04001#ifndef NOTES_CACHE_H
2#define NOTES_CACHE_H
3
4#include "notes.h"
5
Nguyễn Thái Ngọc Duybd7ad452018-11-10 06:49:06 +01006struct repository;
7
Jeff Kinga941d5e2010-04-01 20:07:40 -04008struct notes_cache {
9 struct notes_tree tree;
10 char *validity;
11};
12
Nguyễn Thái Ngọc Duybd7ad452018-11-10 06:49:06 +010013void notes_cache_init(struct repository *r, struct notes_cache *c,
14 const char *name, const char *validity);
Jeff Kinga941d5e2010-04-01 20:07:40 -040015int notes_cache_write(struct notes_cache *c);
16
brian m. carlson569aa372017-05-06 22:09:58 +000017char *notes_cache_get(struct notes_cache *c, struct object_id *oid, size_t
Jeff Kinga941d5e2010-04-01 20:07:40 -040018 *outsize);
brian m. carlson569aa372017-05-06 22:09:58 +000019int notes_cache_put(struct notes_cache *c, struct object_id *oid,
Jeff Kinga941d5e2010-04-01 20:07:40 -040020 const char *data, size_t size);
21
22#endif /* NOTES_CACHE_H */