Caching on a VPS Print

  • vpsservermanagement, caching, vps, woocommerce, php, cdn, wordpress, database, plugins, troubleshooting
  • 0

Multiple layers, each solving a different problem.

OPCODE CACHING

OPcache stores compiled PHP so it is not recompiled on every request. Enable it. The gain is substantial and it costs nothing.

OBJECT CACHING

Redis or Memcached stores database query results in memory. Applications that support it, including WordPress with a plugin, benefit considerably.

Particularly valuable for shops and membership sites where pages cannot be fully cached.

PAGE CACHING

Storing generated HTML so PHP does not run at all. The largest single gain for content sites.

Implemented in the application, at the web server, or by a reverse proxy.

Never cache cart, checkout, account or any page specific to a logged-in visitor.

REVERSE PROXY CACHING

Nginx or Varnish in front, serving cached pages without touching the application. Fastest, and most complex to configure correctly.

CDN

Static files served near visitors, reducing both latency and load on your server.

THE ORDER TO IMPLEMENT

OPcache first, then page caching, then object caching, then a CDN. Each is simpler than the last to get wrong.


Was this answer helpful?
Back

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


Trustpilot