mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 13:05:53 +03:00
[PR #1465] [MERGED] fix(backend): manually reconnect cache services after deserialize in message worker #1534
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#1534
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cypht-org/cypht/pull/1465
Author: @indridieinarsson
Created: 3/7/2025
Status: ✅ Merged
Merged: 3/12/2025
Merged by: @mercihabam
Base:
master← Head:pr_cache_worker📝 Commits (1)
53c0aa9Manually reconnect cache services after deserialize📊 Changes
2 files changed (+30 additions, -0 deletions)
View changed files
📝
lib/cache.php(+29 -0)📝
modules/imap/workers/messages_list.php(+1 -0)📄 Description
🍰 Pullrequest
PR #1452 serializes/unserializes the cache class when handing it to the worker process.
The Redis cache class (and presumably also the memcached class) don't survive this, as the connection to the service is not preserved when serializing. Thus the fetching of messages fails, with a
Redis server went awayexception message. In some cases, the scripts seems to sort-of work and fetch messages, but it takes longer, since the cache is probably not used.This PR tries to fix that by adding a public manual `reconnect' function to the hm_cache class, which reconnects the redis or memcached backends.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.