Keep most of the object in the cache / memory embedded in the database?

It just occurred to me why not use most of the objects in the cache (memory) when starting the application.

if it's not such a great web application. Or have settings for how much I want to cache / memory.

I just think this might require having something like below 1 GB of RAM or much less.

Everything to speed up the application even more without querying the database.

Is that a good idea?

+3
source share
6 answers

- , . , . , memcached.

+1

- .

, . , , , ?

, , . ORM- SQL , .

+1

Not so good idea, node .

.

0

, .

: , , , , /

0

. , , - . , //. , , , db ( - , ).

0

, ehCache (http://ehcache.org/)

, , .

Distribution solves the issue of persistence (if you do your stuff wrong), and disk overflow allows us to basically cache everything that was simply not possible in the cache in memory.

Of course, the implementation is not trivial for a real application, but it significantly improved our performance after the caches were boiling.

0
source

Source: https://habr.com/ru/post/1745297/


All Articles