# Selima Website Content Management System # Cache.pm: The data cache. # Copyright (c) 2003-2018 imacat. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Author: imacat # First written: 2003-03-24 package Selima::Cache; use 5.008; use strict; use warnings; use base qw(Exporter); use vars qw(@EXPORT %EXPORT_TAGS @EXPORT_OK); BEGIN { @EXPORT = qw(); %EXPORT_TAGS = ( account => [qw(%Account_acctsubj_title %Account_acctsubj_code %Account_acctsubj_sn %Account_accttrx_id %Account_accttrx_maxord)], callform=> [qw($CallForm_form_this %Callform_retrieve_form)], chkfunc => [qw(%ChkFunc_check_script %ChkFunc_is_url_reachable)], chkpriv => [qw(%ChkPriv_is_admin %ChkPriv_is_su %ChkPriv_user_parent_groups)], copyyear=> [qw($CopyYear_copyyear)], country => [qw(%Country_ctname)], echoform=> [qw(%EchoForm_opt_list)], formfunc=> [qw($FormFunc_get_or_post $FormFunc_curform $FormFunc_isform $FormFunc_formtype)], getlang => [qw($GetLang_lang $GetLang_charset @GetLang_all_charsets)], guest => [qw(%Guest_is_guest)], links => [qw(%Links_linkcat_title %Links_link_title %Links_link_url %Links_link_tree %Links_link_tree_full)], listfunc=> [qw($ListFunc_listtype)], login => [qw($LogIn_use_users)], https => [qw($HTTPS_https_process $HTTPS_fqdn)], mail => [qw(%Mail_MSGIDS)], picture => [qw(%Picture_pic_deposit)], remohost=> [qw($RemoHost_remote)], scptpriv=> [qw(%ScptPriv_is_script_permitted %ScptPriv_is_admin_script)], setl10n => [qw(%SetL10N_checked)], username=> [qw(%UserName_username %UserName_userid %UserName_groupid %UserName_groupdsc %UserName_groupsn $UserName_su_group_sn)], userpref=> [qw(%UserPref_userpref)], ); @EXPORT_OK = qw(); my %seen; %seen = qw(); foreach my $tag (keys %EXPORT_TAGS) { push @EXPORT_OK, grep !$seen{$_}++, @{$EXPORT_TAGS{$tag}}; } # Prototype declaration sub clear(); } use vars qw(%Account_acctsubj_title %Account_acctsubj_code); use vars qw(%Account_acctsubj_sn %Account_accttrx_id); use vars qw(%Account_accttrx_maxord); use vars qw($CallForm_form_this %Callform_retrieve_form); use vars qw(%ChkFunc_check_script %ChkFunc_is_url_reachable); use vars qw(%ChkPriv_is_admin %ChkPriv_is_su); use vars qw(%ChkPriv_user_parent_groups); use vars qw($CopyYear_copyyear); use vars qw(%Country_ctname); use vars qw(%EchoForm_opt_list); use vars qw($FormFunc_get_or_post $FormFunc_curform $FormFunc_isform); use vars qw($FormFunc_formtype); use vars qw($GetLang_lang $GetLang_charset @GetLang_all_charsets); use vars qw(%Guest_is_guest); use vars qw(%Links_linkcat_title %Links_link_title %Links_link_url); use vars qw(%Links_link_tree %Links_link_tree_full); use vars qw($ListFunc_listtype); use vars qw($LogIn_use_users); use vars qw($HTTPS_https_process $HTTPS_fqdn); use vars qw(%Mail_MSGIDS); use vars qw(%Picture_pic_deposit); use vars qw($RemoHost_remote); use vars qw(%SetL10N_checked); use vars qw(%ScptPriv_is_script_permitted %ScptPriv_is_admin_script); use vars qw(%UserName_username %UserName_userid %UserName_groupid); use vars qw(%UserName_groupdsc %UserName_groupsn $UserName_su_group_sn); use vars qw(%UserPref_userpref); # clear: Clear the cache (for mod_perl) sub clear() { local ($_, %_); %Account_acctsubj_title = qw(); %Account_acctsubj_code = qw(); %Account_acctsubj_sn = qw(); %Account_accttrx_id = qw(); %Account_accttrx_maxord = qw(); undef $CallForm_form_this; %Callform_retrieve_form = qw(); %ChkFunc_check_script = qw(); %ChkFunc_is_url_reachable = qw(); %ChkPriv_is_admin = qw(); %ChkPriv_is_su = qw(); %ChkPriv_user_parent_groups = qw(); undef $CopyYear_copyyear; %Country_ctname = qw(); %EchoForm_opt_list = qw(); undef $FormFunc_get_or_post; undef $FormFunc_curform; undef $FormFunc_isform; undef $FormFunc_formtype; undef $GetLang_lang; undef $GetLang_charset; @GetLang_all_charsets = qw(); %Guest_is_guest = qw(); %Links_linkcat_title = qw(); %Links_link_title = qw(); %Links_link_url = qw(); %Links_link_tree = qw(); %Links_link_tree_full = qw(); undef $ListFunc_listtype; undef $LogIn_use_users; $HTTPS_https_process = 0; undef $HTTPS_fqdn; %Mail_MSGIDS = qw(); %Picture_pic_deposit = qw(); undef $RemoHost_remote; %ScptPriv_is_script_permitted = qw(); %ScptPriv_is_admin_script = qw(); %SetL10N_checked = qw(); %UserName_username = qw(); %UserName_userid = qw(); %UserName_groupid = qw(); %UserName_groupdsc = qw(); %UserName_groupsn = qw(); undef $UserName_su_group_sn; %UserPref_userpref = qw(); return; } return 1;