mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-13 18:51:38 -05:00
* Address number of photos related issues * Fix minor stuff * Update integrations page layout
16 lines
324 B
Ruby
16 lines
324 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Photos::CacheCleaner
|
|
attr_reader :user
|
|
|
|
def initialize(user)
|
|
@user = user
|
|
end
|
|
|
|
def call
|
|
return unless Rails.cache.respond_to?(:delete_matched)
|
|
|
|
Rails.cache.delete_matched("photos_#{user.id}_*")
|
|
Rails.cache.delete_matched("photo_thumbnail_#{user.id}_*")
|
|
end
|
|
end
|