Skip to content

Commit 24900e7

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/langfuse/rails_cache_adapter.rb

Lines changed: 3 additions & 0 deletions
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
9193
# STALE or 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)