From 8195c80aa12136838ff4491fac989e0b946382b1 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 15 Sep 2017 17:35:55 +0100 Subject: PLT-7639: Batch delete methods for data retention. (#7444) --- store/local_cache_supplier_reactions.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'store/local_cache_supplier_reactions.go') diff --git a/store/local_cache_supplier_reactions.go b/store/local_cache_supplier_reactions.go index a67cff2e4..be32ab77e 100644 --- a/store/local_cache_supplier_reactions.go +++ b/store/local_cache_supplier_reactions.go @@ -45,3 +45,9 @@ func (s *LocalCacheSupplier) ReactionDeleteAllWithEmojiName(ctx context.Context, s.doClearCacheCluster(s.reactionCache) return s.Next().ReactionDeleteAllWithEmojiName(ctx, emojiName, hints...) } + +func (s *LocalCacheSupplier) ReactionPermanentDeleteBatch(ctx context.Context, endTime int64, limit int64, hints ...LayeredStoreHint) *LayeredStoreSupplierResult { + // Don't bother to clear the cache as the posts will be gone anyway and the reactions being deleted will + // expire from the cache in due course. + return s.Next().ReactionPermanentDeleteBatch(ctx, endTime, limit) +} -- cgit v1.2.3-1-g7c22