remove dynamic query caching

This commit is contained in:
2025-12-25 02:22:07 -05:00
parent be409e82ae
commit ee96e1f509
2 changed files with 7 additions and 29 deletions
+7
View File
@@ -41,8 +41,15 @@ library(shinyWidgets)
library(paletteer) library(paletteer)
library(shinyjs) library(shinyjs)
APP_DIR <- getwd()
cache_dir <- file.path(APP_DIR, "cache")
cache_logfile <- file.path(APP_DIR, "cachelog")
source(file = "queries.R") source(file = "queries.R")
shinyOptions(cache = cachem::cache_disk(dir = cache_dir, max_age = 86400, evict = "lru", logfile = cache_logfile))
useShinyjs() useShinyjs()
# pull static data # pull static data
-29
View File
@@ -632,45 +632,16 @@ query_cache <- cachem::cache_disk(
logfile = cache_logfile logfile = cache_logfile
) )
get_yearly_economics <- memoise(get_yearly_economics, cache = query_cache)
get_latest_normalization_year <- memoise( get_latest_normalization_year <- memoise(
get_latest_normalization_year, get_latest_normalization_year,
cache = query_cache cache = query_cache
) )
get_yearly_usa_pop_hu <- memoise(get_yearly_usa_pop_hu, cache = query_cache)
get_best_track_summary <- memoise(get_best_track_summary, cache = query_cache)
get_hurdat_id <- memoise(get_hurdat_id, cache = query_cache)
get_all_loss_storms <- memoise(get_all_loss_storms, cache = query_cache) get_all_loss_storms <- memoise(get_all_loss_storms, cache = query_cache)
get_all_hurdat_ids <- memoise(get_all_hurdat_ids, cache = query_cache) get_all_hurdat_ids <- memoise(get_all_hurdat_ids, cache = query_cache)
get_latest_aggregate_losses <- memoise( get_latest_aggregate_losses <- memoise(
get_latest_aggregate_losses, get_latest_aggregate_losses,
cache = query_cache cache = query_cache
) )
get_latest_aggregate_loss <- memoise(
get_latest_aggregate_loss,
cache = query_cache
)
get_unique_lf_ids <- memoise(get_unique_lf_ids, cache = query_cache)
get_normalized_cost_index <- memoise(
get_normalized_cost_index,
cache = query_cache
)
get_all_normalized_cost_index <- memoise(
get_all_normalized_cost_index,
cache = query_cache
)
get_hurdat_landfalls <- memoise(get_hurdat_landfalls, cache = query_cache)
get_all_conus_landfalls <- memoise(get_all_conus_landfalls, cache = query_cache) get_all_conus_landfalls <- memoise(get_all_conus_landfalls, cache = query_cache)
get_all_hurdat_tracks <- memoise(get_all_hurdat_tracks, cache = query_cache) get_all_hurdat_tracks <- memoise(get_all_hurdat_tracks, cache = query_cache)
get_hurdat_track <- memoise(get_hurdat_track, cache = query_cache)
get_normalized_metric_growth <- memoise(
get_normalized_metric_growth,
cache = query_cache
)
get_all_lf_type_landfalls <- memoise(
get_all_lf_type_landfalls,
cache = query_cache
)
get_all_lf_type_factors <- memoise(get_all_lf_type_factors, cache = query_cache) get_all_lf_type_factors <- memoise(get_all_lf_type_factors, cache = query_cache)
get_lf_type_factors <- memoise(get_lf_type_factors, cache = query_cache)
get_county_and_state <- memoise(get_county_and_state, cache = query_cache)