| | |
| | | */ |
| | | public function __construct() |
| | | { |
| | | $this->cache = new CacheManager('notifications', WEEK_IN_SECONDS); // 1 week cache |
| | | $this->cache = CacheManager::for('notifications', WEEK_IN_SECONDS); |
| | | |
| | | // Add filter for bulk operation handling |
| | | add_filter(BASE . 'handle_bulk_operation', [ $this, 'processOperation' ], 10, 3); |
| | |
| | | } |
| | | |
| | | $content = ''; |
| | | $cache = new CacheManager('digest_content', HOUR_IN_SECONDS * 6); // Cache for 6 hours |
| | | $cache = CacheManager::for('digest_content', HOUR_IN_SECONDS * 6); // Cache for 6 hours |
| | | |
| | | // Group updates by artist |
| | | $updates_by_artist = []; |
| | |
| | | */ |
| | | protected function clearNotificationCache(int $user_id):void |
| | | { |
| | | $this->cache->invalidate("user_{$user_id}_notifications_", 'notifications_' . $user_id); |
| | | $this->cache->invalidate("user_{$user_id}_content_notifications_", 'notifications_' . $user_id); |
| | | |
| | | $this->cache->delete("user_{$user_id}_notifications_", 'notifications_' . $user_id); |
| | | $this->cache->delete("user_{$user_id}_content_notifications_", 'notifications_' . $user_id); |
| | | } |
| | | |
| | | /** |