docs-kit 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b53c8fcfcdc8d5053f9019ea56edc5a1b4fce1a8760a220eb19c76a297e72d53
4
- data.tar.gz: 4289ad366b8462a9617db0e696250b717c21af1a30a97126367c370452156e1d
3
+ metadata.gz: 4fee711dcf42e9b92cf749684ea9b94c07ef9d614cf21746881f2c7402f744ea
4
+ data.tar.gz: 76e246db5be838d3b31b8f08a98d033c57e3765d82900245723afc32fd4cad5f
5
5
  SHA512:
6
- metadata.gz: 80f49ed3f55338303fe09ebed720679c440eaadb02a99b112b312dfebafa70b081ccbf3622f20a7a0a6b6f48771969528746465377bda9961b62ce6cf9410521
7
- data.tar.gz: 3dc20bc085a7baa55b0c64098931f03d00553b26e477a606ce1fe878850d96058992cd7ef3e4cbc59bc67c1ea07eb9be26219f2d1c5f7b83a04eb22e82737c47
6
+ metadata.gz: 1a9cd702122f1e7af103b4279d7e3f4d45e8e662d5838931ac622383ce23609befd8557daddd2b3ac4afda772fc148cf0f5458546a8776b6bae3168408f59065
7
+ data.tar.gz: 05ce8bb90585331cdaefa92973c36b67d55b2b6164aae03f55d4679a35d8ce7c4128295e4919a3775123cecaa923355baf1622481741ca3a4312394d5b0dd0a2
@@ -47,6 +47,12 @@ module DocsKit
47
47
  render_text(body) if stale_llms?(body)
48
48
  end
49
49
 
50
+ # Freshness lifetime for a shared cache (dash-proxy, a CDN). `public` on its
51
+ # own is not storable under RFC 9111 — without a max-age the proxy cache
52
+ # skips the response. 300s matches the `proxy.cache.max_ttl` docs-kit
53
+ # scaffolds; the etag below still revalidates within that window.
54
+ LLMS_MAX_AGE = 300
55
+
50
56
  private
51
57
 
52
58
  # NOT named #config — ActionController::Base#config is the Rails config
@@ -66,6 +72,7 @@ module DocsKit
66
72
  # busts it) plus the gem version as the etag salt. In development, always
67
73
  # re-render; production sites deploy immutably so the version etag is stable.
68
74
  def stale_llms?(body)
75
+ expires_in LLMS_MAX_AGE, public: true
69
76
  stale?(etag: [DocsKit::VERSION, body], public: true)
70
77
  end
71
78
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DocsKit
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docs-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson