I have a Sinatra application that needs some static data (~15'000 key/value-pairs). The data does only change every few months or so. I do not want to store the data in a database (the app does not use any other data storage and I dont't want to add any just because of this).
I currently have the following solution:
data/invTypes.yml
:
18: "Plagioclase"
19: "Spodumain"
20: "Kernite"
21: "Hedbergite"
22: "Arkonor"
25: "Corpse"
34: "Tritanium"
35: "Pyerite"
36: "Mexallon"
37: "Isogen"
And then in my app.rb
I do something like this:
# load Type IDS from Static Data
IDS = YAML.load(open('data/invTypes.yml').read
Is there a better solution?