Improve journal/cloud cache locking and add access time tracking.
[bluesky.git] / bluesky / bluesky-private.h
index 46a6690..65f356b 100644 (file)
@@ -265,6 +265,7 @@ struct _BlueSkyLog {
 struct _BlueSkyCacheFile {
     GMutex *lock;
     GCond *cond;
+    gint refcount;
     int type;                   // Only one of CLOUDLOG_{JOURNAL,CLOUD}
     int log_dir;
     int log_seq;
@@ -275,6 +276,7 @@ struct _BlueSkyCacheFile {
     BlueSkyFS *fs;
     BlueSkyLog *log;
     gboolean fetching, ready;
+    int64_t atime;              // Access time, for cache management
 };
 
 BlueSkyLog *bluesky_log_new(const char *log_directory);