bridgetown icon indicating copy to clipboard operation
bridgetown copied to clipboard

feat: Switch to `ActiveSupport::Cache`

Open jaredcwhite opened this issue 4 years ago • 0 comments

Summary

Replace Bridgetown's Jekyll-derived cache subsystem with AS's caching infra, bringing Bridgetown in line with Rails' caching strategies.

Motivation

Our current cache feature is extremely simplistic — it's in-memory/on-disk only, there's no expiration feature, and it doesn't support any other caching strategies such as Redis. The API doesn't particularly align with any other Ruby project.

With the new system, caching in both Bridgetown and a Roda-powered backend can offer a robust solution that is still easy to use but will scale with application size and ambition. We can also invest more thought-leadership into Ruby template-based caching strategies to lower build times which is common in Rails applications.

Rollout Strategy

We can swap out the subsystem while maintaining a compatibility layer in case any existing plugins out there need to utilize the cache. That way there's no major ecosystem disruption.

jaredcwhite avatar Sep 30 '21 19:09 jaredcwhite