Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sympa::List::_cache_get always return undef #1182

Closed
cozy517 opened this issue Jun 5, 2021 · 2 comments
Closed

Sympa::List::_cache_get always return undef #1182

cozy517 opened this issue Jun 5, 2021 · 2 comments

Comments

@cozy517
Copy link

cozy517 commented Jun 5, 2021

Version

6.2.60

Installation method

yum install from epel

Expected behavior

call $self->_cache_get('edit_list_conf') in Sympa/List.pm, get cached HASH reference when edit_list.conf is not updated.
I mean edit_list.conf's mtime is not change.

Actual behavior

Every time returned undef from _cache_get function. Then repeat open file unexpectedly often.

Additional information

File's mtime when last time read.

    my $lasttime = $self->{_mtime}{$type};

File's mtime just now.

        $mtime = $self->_cache_read_expiry($type);
``
If the file is not updated since last opened(usual case) $lasttime and $mtime are same, then returned undef instead of cached data.
return undef if $lasttime <= $mtime;

@ikedas
Copy link
Member

ikedas commented Jun 5, 2021

Hi @cozy517 ,
The issue may be a duplicate of #1090 fixed in Sympa 6.2.62. Could you please check the recent version?

@cozy517
Copy link
Author

cozy517 commented Jun 7, 2021

Thank you for inform and rightly guessed what I mean.
Yes, my actual problem was reading edit_list.conf takes too long.

I just checked _cache_get function is not fixed yet on version 6.2.63b before post.
Now I reallized totally fixed this problem by updating _load_edit_list_conf, may_edit etc.
And I understand current cache mechanism will be gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants