Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/litestack/litecache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ def set(key, value, expires_in = nil)
run_stmt(:setter, key, value, expires_in)
capture(:set, key)
rescue SQLite3::FullException
transaction do
run_stmt(extra_pruner, 0.2)
run_sql("vacuum")
end
run_stmt(:extra_pruner, 0.2)
run_sql("vacuum")
retry
end
true
Expand All @@ -94,7 +92,7 @@ def set_multi(keys_and_values, expires_in = nil)
run_stmt(:setter, key, v, expires_in)
capture(:set, key)
rescue SQLite3::FullException
run_stmt(extra_pruner, 0.2)
run_stmt(:extra_pruner, 0.2)
run_sql("vacuum")
retry
end
Expand Down