@@ -259,7 +259,7 @@ Cache::open(bool clear, bool /* fix ATS_UNUSED */)
259
259
total_nvol = 0 ;
260
260
total_good_nvol = 0 ;
261
261
262
- RecLinkGetRecordInt32 (" proxy.config.cache.min_average_object_size" , &cache_config_min_average_object_size);
262
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.min_average_object_size" , &cache_config_min_average_object_size);
263
263
Dbg (dbg_ctl_cache_init, " Cache::open - proxy.config.cache.min_average_object_size = %d" , cache_config_min_average_object_size);
264
264
265
265
CacheVol *cp = cp_list.head ;
@@ -801,60 +801,60 @@ ink_cache_init(ts::ModuleVersion v)
801
801
{
802
802
ink_release_assert (v.check (CACHE_MODULE_VERSION));
803
803
804
- RecLinkGetRecordInt (" proxy.config.cache.ram_cache.size" , &cache_config_ram_cache_size);
804
+ RecEstablishStaticConfigInteger (" proxy.config.cache.ram_cache.size" , &cache_config_ram_cache_size);
805
805
Dbg (dbg_ctl_cache_init, " proxy.config.cache.ram_cache.size = %" PRId64 " = %" PRId64 " Mb" , cache_config_ram_cache_size,
806
806
cache_config_ram_cache_size / (1024 * 1024 ));
807
807
808
- RecLinkGetRecordInt32 (" proxy.config.cache.ram_cache.algorithm" , &cache_config_ram_cache_algorithm);
809
- RecLinkGetRecordInt32 (" proxy.config.cache.ram_cache.compress" , &cache_config_ram_cache_compress);
810
- RecLinkGetRecordInt32 (" proxy.config.cache.ram_cache.compress_percent" , &cache_config_ram_cache_compress_percent);
808
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.ram_cache.algorithm" , &cache_config_ram_cache_algorithm);
809
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.ram_cache.compress" , &cache_config_ram_cache_compress);
810
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.ram_cache.compress_percent" , &cache_config_ram_cache_compress_percent);
811
811
RecGetRecordIntOrZero (" proxy.config.cache.ram_cache.use_seen_filter" , &cache_config_ram_cache_use_seen_filter);
812
812
813
- RecLinkGetRecordInt32 (" proxy.config.cache.limits.http.max_alts" , &cache_config_http_max_alts);
813
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.limits.http.max_alts" , &cache_config_http_max_alts);
814
814
Dbg (dbg_ctl_cache_init, " proxy.config.cache.limits.http.max_alts = %d" , cache_config_http_max_alts);
815
815
816
- RecLinkGetRecordInt32 (" proxy.config.cache.log.alternate.eviction" , &cache_config_log_alternate_eviction);
816
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.log.alternate.eviction" , &cache_config_log_alternate_eviction);
817
817
Dbg (dbg_ctl_cache_init, " proxy.config.cache.log.alternate.eviction = %d" , cache_config_log_alternate_eviction);
818
818
819
- RecLinkGetRecordInt (" proxy.config.cache.ram_cache_cutoff" , &cache_config_ram_cache_cutoff);
819
+ RecEstablishStaticConfigInteger (" proxy.config.cache.ram_cache_cutoff" , &cache_config_ram_cache_cutoff);
820
820
Dbg (dbg_ctl_cache_init, " cache_config_ram_cache_cutoff = %" PRId64 " = %" PRId64 " Mb" , cache_config_ram_cache_cutoff,
821
821
cache_config_ram_cache_cutoff / (1024 * 1024 ));
822
822
823
- RecLinkGetRecordInt32 (" proxy.config.cache.permit.pinning" , &cache_config_permit_pinning);
823
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.permit.pinning" , &cache_config_permit_pinning);
824
824
Dbg (dbg_ctl_cache_init, " proxy.config.cache.permit.pinning = %d" , cache_config_permit_pinning);
825
825
826
- RecLinkGetRecordInt32 (" proxy.config.cache.dir.sync_frequency" , &cache_config_dir_sync_frequency);
826
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.dir.sync_frequency" , &cache_config_dir_sync_frequency);
827
827
Dbg (dbg_ctl_cache_init, " proxy.config.cache.dir.sync_frequency = %d" , cache_config_dir_sync_frequency);
828
828
829
- RecLinkGetRecordInt32 (" proxy.config.cache.dir.sync_delay" , &cache_config_dir_sync_delay);
829
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.dir.sync_delay" , &cache_config_dir_sync_delay);
830
830
Dbg (dbg_ctl_cache_init, " proxy.config.cache.dir.sync_delay = %d" , cache_config_dir_sync_delay);
831
831
832
- RecLinkGetRecordInt32 (" proxy.config.cache.dir.sync_max_write" , &cache_config_dir_sync_max_write);
832
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.dir.sync_max_write" , &cache_config_dir_sync_max_write);
833
833
Dbg (dbg_ctl_cache_init, " proxy.config.cache.dir.sync_max_write = %d" , cache_config_dir_sync_max_write);
834
834
835
- RecLinkGetRecordInt32 (" proxy.config.cache.select_alternate" , &cache_config_select_alternate);
835
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.select_alternate" , &cache_config_select_alternate);
836
836
Dbg (dbg_ctl_cache_init, " proxy.config.cache.select_alternate = %d" , cache_config_select_alternate);
837
837
838
- RecLinkGetRecordInt32 (" proxy.config.cache.max_doc_size" , &cache_config_max_doc_size);
838
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.max_doc_size" , &cache_config_max_doc_size);
839
839
Dbg (dbg_ctl_cache_init, " proxy.config.cache.max_doc_size = %d = %dMb" , cache_config_max_doc_size,
840
840
cache_config_max_doc_size / (1024 * 1024 ));
841
841
842
- RecLinkGetRecordInt32 (" proxy.config.cache.mutex_retry_delay" , &cache_config_mutex_retry_delay);
842
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.mutex_retry_delay" , &cache_config_mutex_retry_delay);
843
843
Dbg (dbg_ctl_cache_init, " proxy.config.cache.mutex_retry_delay = %dms" , cache_config_mutex_retry_delay);
844
844
845
- RecLinkGetRecordInt32 (" proxy.config.cache.read_while_writer.max_retries" , &cache_config_read_while_writer_max_retries);
845
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.read_while_writer.max_retries" , &cache_config_read_while_writer_max_retries);
846
846
Dbg (dbg_ctl_cache_init, " proxy.config.cache.read_while_writer.max_retries = %d" , cache_config_read_while_writer_max_retries);
847
847
848
- RecLinkGetRecordInt32 (" proxy.config.cache.read_while_writer_retry.delay" , &cache_read_while_writer_retry_delay);
848
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.read_while_writer_retry.delay" , &cache_read_while_writer_retry_delay);
849
849
Dbg (dbg_ctl_cache_init, " proxy.config.cache.read_while_writer_retry.delay = %dms" , cache_read_while_writer_retry_delay);
850
850
851
- RecLinkGetRecordInt32 (" proxy.config.cache.hit_evacuate_percent" , &cache_config_hit_evacuate_percent);
851
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.hit_evacuate_percent" , &cache_config_hit_evacuate_percent);
852
852
Dbg (dbg_ctl_cache_init, " proxy.config.cache.hit_evacuate_percent = %d" , cache_config_hit_evacuate_percent);
853
853
854
- RecLinkGetRecordInt32 (" proxy.config.cache.hit_evacuate_size_limit" , &cache_config_hit_evacuate_size_limit);
854
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.hit_evacuate_size_limit" , &cache_config_hit_evacuate_size_limit);
855
855
Dbg (dbg_ctl_cache_init, " proxy.config.cache.hit_evacuate_size_limit = %d" , cache_config_hit_evacuate_size_limit);
856
856
857
- RecLinkGetRecordInt32 (" proxy.config.cache.force_sector_size" , &cache_config_force_sector_size);
857
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.force_sector_size" , &cache_config_force_sector_size);
858
858
859
859
ink_assert (RecRegisterConfigUpdateCb (" proxy.config.cache.target_fragment_size" , FragmentSizeUpdateCb, nullptr ) != REC_ERR_FAIL);
860
860
RecGetRecordIntOrZero (" proxy.config.cache.target_fragment_size" , &cache_config_target_fragment_size);
@@ -866,19 +866,19 @@ ink_cache_init(ts::ModuleVersion v)
866
866
cache_config_target_fragment_size = MAX_FRAG_SIZE + sizeof (Doc);
867
867
}
868
868
869
- RecLinkGetRecordInt32 (" proxy.config.cache.max_disk_errors" , &cache_config_max_disk_errors);
869
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.max_disk_errors" , &cache_config_max_disk_errors);
870
870
Dbg (dbg_ctl_cache_init, " proxy.config.cache.max_disk_errors = %d" , cache_config_max_disk_errors);
871
871
872
- RecLinkGetRecordInt32 (" proxy.config.cache.agg_write_backlog" , &cache_config_agg_write_backlog);
872
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.agg_write_backlog" , &cache_config_agg_write_backlog);
873
873
Dbg (dbg_ctl_cache_init, " proxy.config.cache.agg_write_backlog = %d" , cache_config_agg_write_backlog);
874
874
875
- RecLinkGetRecordInt32 (" proxy.config.cache.enable_checksum" , &cache_config_enable_checksum);
875
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.enable_checksum" , &cache_config_enable_checksum);
876
876
Dbg (dbg_ctl_cache_init, " proxy.config.cache.enable_checksum = %d" , cache_config_enable_checksum);
877
877
878
- RecLinkGetRecordInt32 (" proxy.config.cache.alt_rewrite_max_size" , &cache_config_alt_rewrite_max_size);
878
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.alt_rewrite_max_size" , &cache_config_alt_rewrite_max_size);
879
879
Dbg (dbg_ctl_cache_init, " proxy.config.cache.alt_rewrite_max_size = %d" , cache_config_alt_rewrite_max_size);
880
880
881
- RecLinkGetRecordInt32 (" proxy.config.cache.enable_read_while_writer" , &cache_config_read_while_writer);
881
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.enable_read_while_writer" , &cache_config_read_while_writer);
882
882
cache_config_read_while_writer = validate_rww (cache_config_read_while_writer);
883
883
RecRegisterConfigUpdateCb (" proxy.config.cache.enable_read_while_writer" , update_cache_config, nullptr );
884
884
Dbg (dbg_ctl_cache_init, " proxy.config.cache.enable_read_while_writer = %d" , cache_config_read_while_writer);
@@ -887,7 +887,7 @@ ink_cache_init(ts::ModuleVersion v)
887
887
888
888
RecGetRecordIntOrZero (" proxy.config.http.wait_for_cache" , &cacheProcessor.wait_for_cache );
889
889
890
- RecLinkGetRecordInt32 (" proxy.config.cache.persist_bad_disks" , &cache_config_persist_bad_disks);
890
+ RecEstablishStaticConfigInt32 (" proxy.config.cache.persist_bad_disks" , &cache_config_persist_bad_disks);
891
891
Dbg (dbg_ctl_cache_init, " proxy.config.cache.persist_bad_disks = %d" , cache_config_persist_bad_disks);
892
892
if (cache_config_persist_bad_disks) {
893
893
std::filesystem::path localstatedir{Layout::get ()->localstatedir };
0 commit comments