Caching Print

  • phplaravel, caching, database, domainrenewal, webhosting, guide, howto, solution
  • 0

Storing expensive results.

WHAT TO CACHE

Expensive queries Computed results External API responses Rendered fragments

WHAT NOT TO CACHE

Anything personal, in a shared cache Anything that must always be current

WHAT DRIVERS EXIST

File, which requires nothing Database Dedicated cache servers, for higher demand

WHAT SUITS SHARED HOSTING

File or database caching.

WHAT TO SET

An expiry appropriate to how stale the data may be.

WHAT TO PLAN

How the cache is cleared when the underlying data changes.

THAT POINT

Stale data is the cost of caching, and clearing must be deliberate.

WHAT LARAVEL ALSO CACHES

Configuration Routes Compiled templates Events

WHAT THAT MEANS FOR DEPLOYMENT

Those caches must be rebuilt after deploying.

WHAT THAT CAUSES OTHERWISE

Changes appearing not to take effect.

THE MOST COMMON DEPLOYMENT REPORT

Exactly that.

WHAT TO DO IN DEVELOPMENT

Leave those caches off.


Was this answer helpful?
Back

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


Trustpilot