I have several data values that I need to store in my rails application, and wanted to find out if there are any alternatives to creating a database table just for this simple task.
Background: I am writing some analytics tools and toolbars for my ruby ruils application, and I hope to speed up the dashboard by caching results that will never change. Right now I am pulling all users over the last 30 days and rebuilding them so that I can see the number of new users per day. It works fine, but takes quite a lot of time, in fact I just need to calculate the very last day and just save the rest of the array in another place.
Where is the best place to store this array?
Creating a database table seems a bit redundant, and I'm not sure if global variables are the right answer. Is there a best practice for such data?
If someone did something like this before letting me know what you did and how it happened.
source
share