+static char *get_bpph_list_cache_key(const char *archive_url)
+{
+ char *key;
+
+ key = malloc(strlen(archive_url + 7) + strlen("/bpph") + 1);
+ sprintf(key, "%s/bpph", archive_url + 7);
+
+ return key;
+}
+
+static struct bpph **get_bpph_list_from_cache(const char *key)
+{
+ char *content;
+ struct bpph **list;
+ json_object *json;
+
+ content = fcache_get(key);
+ if (!content)
+ return NULL;
+
+ json = json_tokener_parse(content);
+ if (!json)
+ return NULL;
+
+ list = json_object_to_bpph_list(json);
+
+ json_object_put(json);
+ free(content);
+
+ return list;
+}
+
+static char *get_last_creation_date(struct bpph **list)
+{
+ time_t last, t;
+ struct bpph **cur;
+
+ last = 0;
+
+ if (list)
+ for (cur = list; *cur; cur++) {
+ t = (*cur)->date_created;
+ if (t > last)
+ last = t;
+ }
+
+ if (last)
+ return time_to_str(last);
+ else
+ return NULL;
+}