tina4ruby 3.10.23 → 3.10.24
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 +4 -4
- data/lib/tina4/frond.rb +6 -12
- data/lib/tina4/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bbf81019e88de5f456938818de88c5f8219dcb691d647c26d504f6aacdf229a
|
|
4
|
+
data.tar.gz: a0b70c415d26e8727cfec8337fc957a58cb4d4895565bc0c1922ef9ebd2383c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a10cdebeca708e63aebaa1f75e8d18e1b77429560f42a0bedcec9247792c9ce7451d93a233f4b6c1bdd8865e7ce4bae3440ae33cded8974e8dbcf4cfac060e93
|
|
7
|
+
data.tar.gz: f613505809da1d5d5868e52a368f09a82e7f24905f5f51011b6747d4b45877e4151d5830f45a943764ba84f42d5b76aa40a47284038dafb8d40406164d748570
|
data/lib/tina4/frond.rb
CHANGED
|
@@ -197,20 +197,14 @@ module Tina4
|
|
|
197
197
|
raise "Template not found: #{path}" unless File.exist?(path)
|
|
198
198
|
|
|
199
199
|
debug_mode = ENV.fetch("TINA4_DEBUG", "").downcase == "true"
|
|
200
|
-
cached = @compiled[template]
|
|
201
200
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
if cached[1] == mtime
|
|
207
|
-
return execute_cached(cached[0], context)
|
|
208
|
-
end
|
|
209
|
-
else
|
|
210
|
-
# Production: skip mtime check, cache is permanent
|
|
211
|
-
return execute_cached(cached[0], context)
|
|
212
|
-
end
|
|
201
|
+
unless debug_mode
|
|
202
|
+
# Production: use permanent cache (no filesystem checks)
|
|
203
|
+
cached = @compiled[template]
|
|
204
|
+
return execute_cached(cached[0], context) if cached
|
|
213
205
|
end
|
|
206
|
+
# Dev mode: skip cache entirely — always re-read and re-tokenize
|
|
207
|
+
# so edits to partials and extended base templates are detected
|
|
214
208
|
|
|
215
209
|
# Cache miss — load, tokenize, cache
|
|
216
210
|
source = File.read(path, encoding: "utf-8")
|
data/lib/tina4/version.rb
CHANGED