educative.io

Shouldn't the cache be updated by the application server

Hi,

Shouldn’t the cache be updated by the application servers>?
The diagram shows an arrow updating the cache. Is that correct?

Hi Xiucheng,

It depends. The database is also a computer with a lot of storage. It can, perfectly, updates the cache when returning to the application server. Im not a fan of adding this responsibility to the database server, since it is already handling too much work, I would prefer my application performing this operation like you said. But it is not wrong doing it like the diagram.

HTH,

Artur

I have the same question as Xiucheng. If the server hosting the db is to update the cache, it is no longer just a database, it is some application which must be running there. This struck me as highly unusual. But perhaps I misunderstand.