Skip to content

Commit e0163ac

Browse files
committed
Add some debug level logging
1 parent 2f788f1 commit e0163ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/langfuse/rails_cache_adapter.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@ def fetch_with_stale_while_revalidate(key, &)
8282

8383
if entry && entry["fresh_until"] > Time.now
8484
# FRESH - return immediately
85+
logger.debug("CACHE HIT!")
8586
entry["data"]
8687
elsif entry && entry["stale_until"] > Time.now
8788
# REVALIDATE - return stale + refresh in background
89+
logger.debug("CACHE STALE!")
8890
schedule_refresh(key, &)
8991
entry["data"] # Instant response! ✨
9092
else
91-
# STALE or MISS - must fetch synchronously
93+
# MISS - must fetch synchronously
94+
logger.debug("CACHE MISS!")
9295
fetch_and_cache_with_metadata(key, &)
9396
end
9497
end

0 commit comments

Comments
 (0)