Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
e531e83c
Commit
e531e83c
authored
Oct 19, 2017
by
IKEDA Soji
Browse files
%Sympa::List::list_cache is not so effective. Remove it and Sympa::List::init_list_cache().
parent
723e833e
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/cgi/wwsympa.fcgi.in
View file @
e531e83c
...
...
@@ -1041,10 +1041,7 @@ while ($query = new_loop()) {
$log->{level} = $Conf::Conf{'log_level'};
$language->set_lang(Sympa::best_language('*'));
## Empty cache of the List.pm module
Sympa::List::init_list_cache();
# Process grouped notifications
# Process grouped notifications.
Sympa::Alarm->instance->flush;
## Check effective ID
...
...
src/lib/Sympa/List.pm
View file @
e531e83c
...
...
@@ -294,8 +294,6 @@ currently selected descriptor.
## Database and SQL statement handlers
my ($sth, @sth_stack);
my %list_cache;
# DB fields with numeric type.
# We should not do quote() for these while inserting data.
my %db_struct = Sympa::DatabaseDescription::full_db_struct();
...
...
@@ -2068,12 +2066,9 @@ sub delete_list_member {
if ($exclude) {
## Insert in exclusion_table if $user->{'included'} eq '1'
$self->insert_delete_exclusion($who, 'insert');
}
delete $list_cache{'get_list_member'}{$self->{'domain'}}{$name}{$who};
## Delete record in SUBSCRIBER
# Delete record in subscriber_table.
unless (
$sdm
and $sdm->do_prepared_query(
...
...
@@ -2562,13 +2557,6 @@ sub get_list_member {
my $self = shift;
my $email = Sympa::Tools::Text::canonic_email(shift);
## Use session cache
if (defined $list_cache{'get_list_member'}{$self->{'domain'}}
{$self->{'name'}}{$email}) {
return $list_cache{'get_list_member'}{$self->{'domain'}}
{$self->{'name'}}{$email};
}
my $sdm = Sympa::DatabaseManager->instance;
my $sth;
...
...
@@ -2629,9 +2617,6 @@ sub get_list_member {
}
}
# Set session cache
$list_cache{'get_list_member'}{$self->{'domain'}}{$self->{'name'}}
{$email} = $user;
return $user;
}
...
...
@@ -3460,7 +3445,6 @@ sub update_list_member {
$values = {@_} unless ref $values eq 'HASH';
my ($field, $value, $table);
my $name = $self->{'name'};
# Mapping between var and field names.
my %map_field = _map_list_member_cols();
...
...
@@ -3593,9 +3577,6 @@ sub update_list_member {
}
}
## Reset session cache
$list_cache{'get_list_member'}{$self->{'domain'}}{$name}{$who} = undef;
return 1;
}
...
...
@@ -4076,11 +4057,8 @@ sub add_list_admin {
#sub check_list_authz;
## Initialize internal list cache
sub init_list_cache {
$log->syslog('debug2', '');
undef %list_cache;
}
# Deprecated. No longer used.
#sub init_list_cache;
## May the indicated user edit the indicated list parameter or not?
sub may_edit {
...
...
@@ -10005,9 +9983,6 @@ sub new {
}
}
## Initialize internal list cache
undef %list_cache;
# create a new Robot object
bless $robot, $pkg;
...
...
src/lib/Sympa/SOAP/Transport.pm
View file @
e531e83c
...
...
@@ -61,9 +61,6 @@ sub request {
$ENV
{'
SYMPA_ROBOT
'}
=
Sympa::Tools::WWW::
get_robot
('
soap_url_local
',
'
soap_url
');
## Empty cache of the List.pm module
Sympa::List::
init_list_cache
();
my
$session
;
## Existing session or new one
if
(
Sympa::Session::
get_session_cookie
(
$ENV
{'
HTTP_COOKIE
'}))
{
...
...
src/lib/Sympa/Spindle/ProcessArchive.pm
View file @
e531e83c
...
...
@@ -49,12 +49,8 @@ sub _init {
my
$state
=
shift
;
if
(
$state
==
1
)
{
Sympa::List::
init_list_cache
();
# Process grouped notifications.
Sympa::
Alarm
->
instance
->
flush
;
}
elsif
(
$state
==
2
)
{
## Free zombie sendmail process.
#Sympa::Process->instance->reap_child;
}
1
;
...
...
src/lib/Sympa/Spindle/ProcessAutomatic.pm
View file @
e531e83c
...
...
@@ -51,12 +51,8 @@ sub _init {
my
$state
=
shift
;
if
(
$state
==
1
)
{
Sympa::List::
init_list_cache
();
# Process grouped notifications.
Sympa::
Alarm
->
instance
->
flush
;
}
elsif
(
$state
==
2
)
{
## Free zombie sendmail process.
#Sympa::Process->instance->reap_child;
}
1
;
...
...
src/lib/Sympa/Spindle/ProcessBounce.pm
View file @
e531e83c
...
...
@@ -56,12 +56,8 @@ sub _init {
my
$state
=
shift
;
if
(
$state
==
1
)
{
Sympa::List::
init_list_cache
();
# Process grouped notifications.
Sympa::
Alarm
->
instance
->
flush
;
}
elsif
(
$state
==
2
)
{
## Free zombie sendmail process.
#Sympa::Process->instance->reap_child;
}
1
;
...
...
src/lib/Sympa/Spindle/ProcessIncoming.pm
View file @
e531e83c
...
...
@@ -55,8 +55,7 @@ sub _init {
$self
->
{
_msgid
}
=
{};
$self
->
{
_msgid_cleanup
}
=
time
;
}
elsif
(
$state
==
1
)
{
Sympa::List::
init_list_cache
();
# Process grouped notifications
# Process grouped notifications.
Sympa::
Alarm
->
instance
->
flush
;
# Cleanup in-memory msgid table, only in a while.
...
...
@@ -65,9 +64,6 @@ sub _init {
$self
->
_clean_msgid_table
();
$self
->
{
_msgid_cleanup
}
=
time
;
}
}
elsif
(
$state
==
2
)
{
## Free zombie sendmail process.
#Sympa::Process->instance->reap_child;
}
1
;
...
...
src/lib/Sympa/Spindle/ProcessOutgoing.pm
View file @
e531e83c
...
...
@@ -70,11 +70,7 @@ sub _init {
?
$self
->
{
log_level
}
:
$
Conf::
Conf
{'
log_level
'};
## Free zombie sendmail process.
#Sympa::Process->instance->reap_child;
Sympa::List::
init_list_cache
();
# Process grouped notifications
# Process grouped notifications.
Sympa::
Alarm
->
instance
->
flush
;
unless
(
$process
->
{
detached
})
{
...
...
src/sbin/task_manager.pl.in
View file @
e531e83c
...
...
@@ -253,10 +253,7 @@ foreach (keys %asgn_commands) {
while
(
!
$end
)
{
my
$current_date
=
time
;
# current epoch date
## Empty cache of the List.pm module
Sympa::List::
init_list_cache
();
# Process grouped notifications
# Process grouped notifications.
Sympa::
Alarm
->
instance
->
flush
;
## List all tasks
...
...
@@ -403,9 +400,6 @@ while (!$end) {
}
sleep
60
;
## Free zombie sendmail processes
#Sympa::Process->instance->reap_child;
}
# Purge grouped notifications
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment