java - Would it be wrong to use a static object instead of a database? -
This is essentially a design pattern question:
I get a database to get a list The stock was expected to ask (shares / securities) which are the most correlated for a given stock.
Instead, I thought I should make an object that would have a stable hashmap and store my data there. Then "query" every time I need it
Is there something wrong with this approach, because I believe it will significantly improve performance with the query of a database for data. The amount of data is relatively small and does not increase so there is no problem. Maybe there are any problems that will bite me later?
I still use the database for backup reasons, but local for quick access to the client To store data on a file system, using the Oscache-like caching API, if the system goes down, then restore the cache from the database and use the cache in your code
Comments
Post a Comment