svelte-on-rails 22.5.4 → 22.5.5
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b68077cf4a1661381ad07003c4b4bb08f837c5c7c25715e766c417aed5ef00e1
|
|
4
|
+
data.tar.gz: 93f86527e6be4a76d1bcbb0ecc45c9116bcb38442ad19318aca269b446c4ed68
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7120ba8595db223b52a9ca2be209ea927fced27d2dfc8844cbe2dfdf962d8e4e030432dfc3d9535eb801685c35ef08dce5b357c56e8f74105ffbebd1ba1cc667
|
|
7
|
+
data.tar.gz: c60db572d6ab9c5407577fc6369393602a22a2f8c60905c2650385dd2b38c9f3c97cee0ca1300c98409e67af68d0af863b7797e4e1dfb76ddf3672c44e85ee01
|
|
@@ -43,7 +43,7 @@ module SvelteOnRails
|
|
|
43
43
|
# DEFAULTS
|
|
44
44
|
|
|
45
45
|
rd = @configs[:redis_cache_store] && @configs[:redis_cache_store][:namespace]
|
|
46
|
-
@redis_namespace ||= "#{rd || app_name}:svelte-on-rails:#{Rails.env rescue 'no-env'}"
|
|
46
|
+
@redis_namespace ||= "#{rd || app_name}:svelte-on-rails:#{Rails.env rescue 'no-env'}:"
|
|
47
47
|
@configs[:skip_ssr_header] ||= 'X-Turbo-Request-ID'
|
|
48
48
|
if defined? Redis
|
|
49
49
|
@redis_instance = Redis.new(url: redis_cache_store[:url])
|
|
@@ -344,10 +344,11 @@ module SvelteOnRails
|
|
|
344
344
|
fingerprint = (@conf.watch_changes? ? @conf.fingerprint(component_paths[:path], debug?, component_paths[:name]) : '')
|
|
345
345
|
|
|
346
346
|
cache_key_raw = @options.to_s +
|
|
347
|
-
@cached_props.to_s +
|
|
348
|
-
|
|
347
|
+
@cached_props.to_s +
|
|
348
|
+
fingerprint +
|
|
349
|
+
@html_options.to_s
|
|
349
350
|
|
|
350
|
-
"#{@conf.redis_namespace}
|
|
351
|
+
"#{@conf.redis_namespace}#{@component_name.gsub('/','-')}:#{Digest::XXH64.hexdigest(cache_key_raw)}"
|
|
351
352
|
end
|
|
352
353
|
end
|
|
353
354
|
|
data/lib/tasks/cache_tasks.rake
CHANGED
|
@@ -13,7 +13,7 @@ namespace :svelte_on_rails do
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
if Rails.env.production? && ENV["FORCE"] != "1"
|
|
16
|
-
print "You are about to delete all keys matching «#{namespace}
|
|
16
|
+
print "You are about to delete all keys matching «#{namespace}*» in PRODUCTION. Continue? (y/N) "
|
|
17
17
|
answer = STDIN.gets.to_s.strip.downcase
|
|
18
18
|
unless %w[y yes].include?(answer)
|
|
19
19
|
puts "Aborted."
|
|
@@ -21,7 +21,7 @@ namespace :svelte_on_rails do
|
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
pattern = "#{namespace}
|
|
24
|
+
pattern = "#{namespace}*"
|
|
25
25
|
cursor = "0"
|
|
26
26
|
total_deleted = 0
|
|
27
27
|
batches = 0
|
|
@@ -60,7 +60,7 @@ namespace :svelte_on_rails do
|
|
|
60
60
|
next
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
pattern = "#{namespace}
|
|
63
|
+
pattern = "#{namespace}*"
|
|
64
64
|
|
|
65
65
|
puts "Scanning Redis for keys matching «#{pattern}» ..."
|
|
66
66
|
|