Keep large JSON in-memory accessible for every request


I want to load a large JSON file (all cities and states) and keep it in-memory, accessible for every request. Kind of like $_CUSTOM.cities. Loading the file at every request is inefficient

Any tips on how to accomplish so?

Custom module looks like the best way to go:

1 Like