nitro_pg_cache 0.1.1.rc1 → 0.1.2.rc1
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/README.md +9 -3
- data/lib/models/nitro_partial.rb +2 -2
- data/lib/nitro_pg_cache/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca11a384f2e4060536912e803781cdb598d8e4e0
|
|
4
|
+
data.tar.gz: 0a714ae94cabf9fa17f5918fb8cf62edca9f0104
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf90deed7216729ad1d22a689dba70e18239587ee3e5eef8298a04284f62aff0d79f795e5bb7544045698f106130b6becd64f2b3942382ede0487fedd83ee4a2
|
|
7
|
+
data.tar.gz: cfd14b0e52cb72ca9dec1f1fa38e4a1109dc01226cd988f84c46fd75645fc821a00db148d8f5210602f6a34c04bee0b6270ced39ef690570191dc336c6916b2a
|
data/README.md
CHANGED
|
@@ -334,10 +334,16 @@ so we can set prerender scope with condition on :created_at column, and prerende
|
|
|
334
334
|
Второй пример: мы ведем длинную историю оплат пользователей, но для работы бухов нужен последний квартал или там год
|
|
335
335
|
мы можем выставить scope для пререндеринга по :created_at и пререрндерить только нужные записи.
|
|
336
336
|
|
|
337
|
-
### EXPIRING
|
|
338
|
-
Right now all cache get timestamp for the last access ( :viewed_at ) so it possible to control cache expiration on time basis
|
|
339
337
|
|
|
340
|
-
###
|
|
338
|
+
### EXPIRING
|
|
339
|
+
NitroCache table contains only actual not-expired caches. Any touch of nitro_cacheable record will destroy all it nitro_caches (and prerender thoose with prerender-true option), so that is how expiration maintained.
|
|
340
|
+
|
|
341
|
+
### Keeping NitroCache table small and user actual
|
|
342
|
+
Right now all cache get timestamp for the last access ( :viewed_at ) so it possible to control table size on time basis.
|
|
343
|
+
I.e. you can remove those caches that lost their actuality to users and have been out of users attention for a long period.
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
### СБРОС НЕ ИСПОЛЬЗУЕМЫХ КЕШЕЙ
|
|
341
347
|
Сейчас все ключи хранят штамп времени последнего просмотра поэтому можно легко реализовать устаревающий кеш. например как рейк + крон-джоб
|
|
342
348
|
|
|
343
349
|
|
data/lib/models/nitro_partial.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nitro_pg_cache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- alekseyl
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|