Home

>

Tools

>

Ghost

>

Releases

>

4.48.5

Ghost Release: 4.48.5

Tag Name: v4.48.5

Release Date: 9/29/2022

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Improved Caching for Better Performance

Ghost 4.48.5 introduces significant improvements to caching mechanisms across the platform. This release focuses on optimizing how content is cached both in browsers and by shared caching services like Fastly and Cloudflare. By refining cache control headers and implementing more granular caching rules, Ghost sites should experience better performance and reduced server load.

These changes primarily affect how 404 responses, Content API responses, admin assets, and versioned API requests are cached, making Ghost more efficient when deployed behind CDNs or other caching layers.

Highlight of the Release

    • Enabled shared caching for Content API responses by changing cache control from private to public
    • Made admin assets aggressively cacheable with 'immutable' cache control directive
    • Improved caching of 404 error responses for better performance during traffic spikes
    • Enhanced versioned API request caching with more granular Vary header implementation

Migration Guide

No migration steps are required for this release. The caching improvements are applied automatically when you upgrade to Ghost 4.48.5.

Upgrade Recommendations

This release is recommended for all Ghost users, especially those using CDNs or experiencing performance issues. The caching improvements provide significant performance benefits with no breaking changes.

To upgrade:

  1. Back up your Ghost installation
  2. Follow the standard upgrade process for your installation method (Ghost CLI, Docker, or manual installation)
  3. No configuration changes are required after upgrade

If you're using a CDN like Fastly or Cloudflare, you may want to purge your cache after upgrading to ensure the new caching rules take effect immediately.

Bug Fixes

Caching-Related Fixes

  • Fixed issue where the private value in Cache-Control headers for error responses prevented shared caches from working efficiently.

  • Resolved problem where 404 responses couldn't be cached by CDNs due to overly restrictive cache control headers.

  • Fixed caching configuration for /members/api/site responses to enable shared caching.

  • Addressed issue with versioned API responses not being properly differentiated in cache based on requested version.

New Features

Enhanced Caching Mechanisms

  • Public Content API Caching: Changed Content API caching from private to public, allowing both browser and shared caches (CDNs) to store responses. This significantly improves performance for content delivery.

  • Immutable Admin Assets: Admin assets now use the immutable cache-control directive with year-long max-age values. This prevents unnecessary If-None-Match requests, making the admin interface load faster after the initial visit.

  • Granular Versioned API Caching: Implemented more precise Vary header handling for versioned API requests, instructing caching mechanisms to consider the Accept-Version header when caching responses.

Security Updates

No security fixes were included in this release.

Performance Improvements

Performance Optimizations

  • Shared Caching Support: Modified cache control headers across multiple endpoints to support shared caching services like Fastly and Cloudflare, reducing origin server load.

  • Optimized 404 Response Handling: Implemented efficient caching for 404 responses from GET requests that are not user-specific, improving performance during high traffic periods.

  • Admin Asset Caching: Added immutable directive to admin asset cache headers, eliminating redundant browser validation requests and speeding up admin interface loading.

  • More Efficient Content API: Changed Content API cache control from private to public with appropriate settings to allow for more aggressive HTTP caching while maintaining data freshness.

  • Improved Cache Granularity: Enhanced the Vary header implementation for versioned API requests, ensuring proper cache differentiation based on API version.

Impact Summary

Ghost 4.48.5 focuses on performance optimization through improved caching mechanisms. The changes primarily affect how content is cached both in browsers and by shared caching services.

The most significant improvements include:

  1. Better CDN Integration: Modified cache control headers to work more efficiently with services like Fastly and Cloudflare.

  2. Optimized Admin Experience: Admin assets now use immutable caching for faster loading times.

  3. More Efficient Content Delivery: Content API responses can now be cached by shared caches, improving delivery speed.

  4. Improved Error Handling: 404 responses can now be cached by CDNs, reducing server load during traffic spikes.

These changes are particularly beneficial for high-traffic sites and those using CDNs. The performance improvements should be noticeable without requiring any configuration changes from users.

Full Release Notes

Statistics:

File Changed46
Line Additions353
Line Deletions325
Line Changes678
Total Commits8

User Affected:

  • Will experience improved site performance due to better caching mechanisms
  • Sites using CDNs like Fastly or Cloudflare will see more efficient caching behavior
  • Reduced server load during traffic spikes due to improved shared caching

Contributors:

nazdaniellockyer