Index: openacs-4/packages/search/tcl/search-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/search-init.tcl,v diff -u -N -r1.13.2.2 -r1.13.2.3 --- openacs-4/packages/search/tcl/search-init.tcl 22 Feb 2021 17:01:44 -0000 1.13.2.2 +++ openacs-4/packages/search/tcl/search-init.tcl 22 Feb 2021 17:41:53 -0000 1.13.2.3 @@ -5,16 +5,17 @@ ad_proc -private search::init::schedule_indexer {} { - Schedule the indexer if the search package has been instantiated (indexing doesn't work - if it hasn't been, so why should we schedule it?). + Schedule the indexer if the search package has been instantiated + (indexing doesn't work if it hasn't been, so why should we + schedule it?). - We do not use the cached api apm_package_id_from_key to avoid - forcing the user to restart their server after mounting search. } { - set package_id [db_string get_package { - select package_id from apm_packages - where package_key = 'search' - } -default 0] + # + # Flush cache to avoid forcing the user to restart their server + # after mounting search. + # + apm_flush_package_id_cache search + set package_id [apm_package_id_from_key search] if { $package_id != 0 } { ad_schedule_proc \ -thread t [parameter::get \