summaryrefslogtreecommitdiff
path: root/src/or/rendcache.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-10-02 13:40:26 +0200
committerNick Mathewson <nickm@torproject.org>2015-10-02 13:40:26 +0200
commit0b3190d4b73be07dd78c3c0bca8b30651915fc37 (patch)
treed6ffd0ab6df8898fdd365d8d991f02f183c72fd5 /src/or/rendcache.h
parent0e03a0421ee83892b1612f74f95c01c15b4aef19 (diff)
parent08b1738a18e9e323109e7e0f0a23158bbd45a5c1 (diff)
downloadtor-0b3190d4b73be07dd78c3c0bca8b30651915fc37.tar.gz
tor-0b3190d4b73be07dd78c3c0bca8b30651915fc37.zip
Merge remote-tracking branch 'donncha/feature14846_4'
Diffstat (limited to 'src/or/rendcache.h')
-rw-r--r--src/or/rendcache.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/rendcache.h b/src/or/rendcache.h
index 0512058054..a5ad2da3b4 100644
--- a/src/or/rendcache.h
+++ b/src/or/rendcache.h
@@ -48,14 +48,21 @@ typedef struct rend_cache_failure_t {
digestmap_t *intro_failures;
} rend_cache_failure_t;
+typedef enum {
+ REND_CACHE_TYPE_CLIENT = 1,
+ REND_CACHE_TYPE_SERVICE = 2,
+} rend_cache_type_t;
+
void rend_cache_init(void);
-void rend_cache_clean(time_t now);
+void rend_cache_clean(time_t now, rend_cache_type_t cache_type);
void rend_cache_failure_clean(time_t now);
void rend_cache_clean_v2_descs_as_dir(time_t now, size_t min_to_remove);
void rend_cache_purge(void);
void rend_cache_free_all(void);
int rend_cache_lookup_entry(const char *query, int version,
rend_cache_entry_t **entry_out);
+int rend_cache_lookup_v2_desc_as_service(const char *query,
+ rend_cache_entry_t **entry_out);
int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc);
/** Return value from rend_cache_store_v2_desc_as_{dir,client}. */
typedef enum {
@@ -65,6 +72,8 @@ typedef enum {
} rend_cache_store_status_t;
rend_cache_store_status_t rend_cache_store_v2_desc_as_dir(const char *desc);
+rend_cache_store_status_t rend_cache_store_v2_desc_as_service(
+ const char *desc);
rend_cache_store_status_t rend_cache_store_v2_desc_as_client(const char *desc,
const char *desc_id_base32,
const rend_data_t *rend_query,