Skip to content
Snippets Groups Projects

Swap to UNLINK for Redis set cache

Merged Robert May requested to merge unlink-cache-deletions into master
  1. Mar 16, 2020
    • Robert May's avatar
      No need to glob keys again · b7cff7f5
      Robert May authored and Stan Hu's avatar Stan Hu committed
      b7cff7f5
    • Robert May's avatar
      Gracefully fall back to DEL · 474ed146
      Robert May authored and Stan Hu's avatar Stan Hu committed
      If UNLINK is not supported by the Redis server, we should
      fall back to DEL. UNLINK was introduced in Redis 4.
      474ed146
    • Robert May's avatar
      Swap to UNLINK for Redis set cache · 568905a0
      Robert May authored and Stan Hu's avatar Stan Hu committed
      This uses UNLINK in Redis 4 to delete sets. This unlinks the key
      from the value but actually deletes the value asynchronously.
      With large sets this should give us a reasonable performance boost.
      
      This commit also implements multi-key deletes for RepositorySetCache
      methods in the Repository model, meaning only one UNLINK call will be
      issued for all sets being expired.
      568905a0
Loading