lib/table_sync/publishing/helpers/debounce.rb in table_sync-6.4.2 vs lib/table_sync/publishing/helpers/debounce.rb in table_sync-6.5.0

- old
+ new

@@ -122,10 +122,14 @@ memoize def cached_sync_time Rails.cache.read(cache_key) end def cache_next_sync_time - Rails.cache.write(cache_key, next_sync_time) + Rails.cache.write( + cache_key, + next_sync_time, + expires_at: next_sync_time + debounce_time.seconds, + ) end def cache_key "#{object_class}/#{needle.values.join}_table_sync_time".delete(" ") end