commit f403d6f
default
·
2022-11-26 04:46:21 +0000 UTC
parent 405bf6b
Renamed object_user_cache() to object_user_cache_add().
1 files changed,
+5,
-3
M
data.c
M
data.c
+5,
-3
1@@ -464,6 +464,8 @@ int _object_add(const char *id, d_char *obj, int ow)
2 /* create a one-element index with the parent */
3 xs *p_idx = xs_replace(fn, ".json", "_p.idx");
4 index_add(p_idx, in_reply_to);
5+
6+ srv_debug(0, xs_fmt("object_add added parent %s to %s", in_reply_to, p_idx));
7 }
8 }
9 else
10@@ -554,7 +556,7 @@ int object_admire(const char *id, const char *actor, int like)
11 }
12
13
14-int object_user_cache(snac *snac, const char *id, const char *cachedir)
15+int object_user_cache_add(snac *snac, const char *id, const char *cachedir)
16 /* caches an object into a user cache */
17 {
18 xs *ofn = _object_fn(id);
19@@ -944,14 +946,14 @@ void timeline_update_indexes(snac *snac, const char *id)
20 xs *idx = xs_fmt("%s/private.idx", snac->basedir);
21 index_add(idx, id);
22
23- object_user_cache(snac, id, "private");
24+ object_user_cache_add(snac, id, "private");
25
26 if (xs_startswith(id, snac->actor)) {
27 /* add to the public index */
28 idx = xs_replace_i(idx, "private", "public");
29 index_add(idx, id);
30
31- object_user_cache(snac, id, "public");
32+ object_user_cache_add(snac, id, "public");
33 }
34 }
35