Knowledgebase

Object Caching and Its Effect on Databases Print

  • databasesphpmyadmin, databases, caching, database, plugins, wordpress, woocommerce, performance, support
  • 0

Reducing repeated queries.

WHAT IT IS

Storing the results of database queries in memory, so repeated identical queries do not hit the database.

Distinct from page caching, which stores whole rendered pages.

WHY IT HELPS

A page running four hundred queries, many of them identical across requests, benefits enormously.

Particularly useful for logged-in traffic and for shops, where page caching cannot apply.

WHAT PROVIDES IT

Redis or Memcached, where available on your plan.

Some applications also have a file-based object cache, which is slower and still better than nothing.

CHECKING AVAILABILITY

Open a ticket and ask what is available on your plan. It varies.

CONFIGURING IT

A plugin connects the application to the cache. WordPress requires a drop-in file that the plugin installs.

WHAT TO WATCH

Stale data. A cache serving an outdated value after a change is the usual complaint.

Flush the object cache after configuration changes.

THE ORDER OF PRIORITY

Page caching first, since it eliminates the request entirely. Object caching second, for what page caching cannot cover.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot