infopark_component_cache 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/README.md +8 -0
- data/Rakefile +17 -9
- data/app/helpers/infopark_component_cache_helper.rb +1 -7
- data/infopark_component_cache.gemspec +6 -3
- data/lib/engine.rb +35 -1
- data/lib/infopark_component_cache.rb +0 -14
- data/lib/infopark_component_cache/abstract_cache_storage.rb +40 -0
- data/lib/infopark_component_cache/cache_storage.rb +10 -24
- data/lib/infopark_component_cache/component.rb +1 -3
- data/lib/infopark_component_cache/component_cache.rb +9 -12
- data/lib/infopark_component_cache/consistency_guard.rb +3 -4
- data/lib/infopark_component_cache/delayed_guard.rb +65 -0
- data/lib/infopark_component_cache/guards/always_consistent.rb +1 -1
- data/lib/infopark_component_cache/guards/cms_state_guard.rb +32 -0
- data/lib/infopark_component_cache/guards/delayed_last_changed.rb +18 -0
- data/lib/infopark_component_cache/guards/delayed_obj_count.rb +18 -0
- data/lib/infopark_component_cache/guards/delayed_valid_from.rb +18 -0
- data/lib/infopark_component_cache/guards/delayed_valid_until.rb +18 -0
- data/lib/infopark_component_cache/guards/last_changed.rb +3 -3
- data/lib/infopark_component_cache/guards/never_consistent.rb +1 -1
- data/lib/infopark_component_cache/guards/obj_count.rb +3 -3
- data/lib/infopark_component_cache/guards/valid_from.rb +3 -3
- data/lib/infopark_component_cache/guards/valid_until.rb +3 -3
- data/lib/infopark_component_cache/guards/value_present.rb +1 -1
- data/lib/infopark_component_cache/version.rb +1 -1
- data/lib/infopark_component_cache/volatile_cache.rb +13 -0
- data/lib/infopark_component_cache/volatile_cache_storage.rb +18 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/models/obj.rb +2 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +19 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +11 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/test.rb +10 -0
- data/spec/dummy/config/initializers/secret_token.rb +1 -0
- data/spec/dummy/config/initializers/session_store.rb +1 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +8 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +3 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/lib/delayed_guard_spec.rb +72 -0
- data/spec/lib/guards/always_consistent_spec.rb +21 -0
- data/spec/lib/guards/last_changed_spec.rb +66 -0
- data/spec/lib/guards/never_consistent_spec.rb +21 -0
- data/spec/lib/guards/obj_count_spec.rb +64 -0
- data/spec/lib/guards/valid_from_spec.rb +66 -0
- data/spec/lib/guards/valid_until_spec.rb +73 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/support/cache_switching_macros.rb +29 -0
- metadata +147 -79
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'infopark_component_cache/guards/always_consistent'
|
3
|
+
|
4
|
+
describe InfoparkComponentCache::Guards::AlwaysConsistent do
|
5
|
+
{"with cache disabled" => :disable_cache, "with cache enabled" => :enable_cache}.each do |context_description, macro|
|
6
|
+
context context_description do
|
7
|
+
self.send(macro)
|
8
|
+
|
9
|
+
subject { described_class.new(double) }
|
10
|
+
|
11
|
+
context "without a call to guard!" do
|
12
|
+
it { is_expected.to be_consistent }
|
13
|
+
end
|
14
|
+
|
15
|
+
context "with a call to guard!" do
|
16
|
+
before { subject.guard! }
|
17
|
+
it { is_expected.to be_consistent }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe InfoparkComponentCache::Guards::LastChanged do
|
4
|
+
let(:cache_component_stub) do
|
5
|
+
double.tap do |cache_component_stub|
|
6
|
+
cache_component_stub.stub(:cache_key) do |input|
|
7
|
+
input.inspect
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:maximum_last_changed) { 10.minutes.ago.to_iso }
|
13
|
+
|
14
|
+
let(:obj_stub) do
|
15
|
+
double.tap do |obj_stub|
|
16
|
+
obj_stub.stub(:scoped).and_return(obj_stub)
|
17
|
+
obj_stub.stub(:where).and_return(obj_stub)
|
18
|
+
obj_stub.stub(:maximum) do |field|
|
19
|
+
maximum_last_changed if field == :last_changed
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
before { InfoparkComponentCache::CmsStateGuard.obj_root_class = obj_stub }
|
25
|
+
|
26
|
+
subject { described_class.new(cache_component_stub) }
|
27
|
+
|
28
|
+
context "with cache disabled" do
|
29
|
+
disable_cache
|
30
|
+
|
31
|
+
context "without a call to guard!" do
|
32
|
+
it { is_expected.not_to be_consistent }
|
33
|
+
end
|
34
|
+
|
35
|
+
context "with a call to guard!" do
|
36
|
+
before { subject.guard! }
|
37
|
+
it { is_expected.not_to be_consistent }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "with cache enabled" do
|
42
|
+
enable_cache
|
43
|
+
before { Rails.cache.clear }
|
44
|
+
|
45
|
+
context "without a call to guard!" do
|
46
|
+
it { is_expected.not_to be_consistent }
|
47
|
+
end
|
48
|
+
|
49
|
+
context "with a call to guard!" do
|
50
|
+
before { subject.guard! }
|
51
|
+
it { is_expected.to be_consistent }
|
52
|
+
end
|
53
|
+
|
54
|
+
context "after maximum last change changes" do
|
55
|
+
before { subject.guard! }
|
56
|
+
before { obj_stub.stub(:maximum).and_return(Time.now.to_iso) }
|
57
|
+
it { is_expected.not_to be_consistent }
|
58
|
+
end
|
59
|
+
|
60
|
+
context "after maximum last change changes to a past date" do
|
61
|
+
before { subject.guard! }
|
62
|
+
before { obj_stub.stub(:maximum).and_return(1.month.ago.to_iso) }
|
63
|
+
it { is_expected.to be_consistent }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'infopark_component_cache/guards/never_consistent'
|
3
|
+
|
4
|
+
describe InfoparkComponentCache::Guards::NeverConsistent do
|
5
|
+
{"cache disabled" => :disable_cache, "cache enabled" => :enable_cache}.each do |context_description, macro|
|
6
|
+
context context_description do
|
7
|
+
self.send(macro)
|
8
|
+
|
9
|
+
subject { described_class.new(double) }
|
10
|
+
|
11
|
+
context "without a call to guard!" do
|
12
|
+
it { is_expected.not_to be_consistent }
|
13
|
+
end
|
14
|
+
|
15
|
+
context "with a call to guard!" do
|
16
|
+
before { subject.guard! }
|
17
|
+
it { is_expected.not_to be_consistent }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe InfoparkComponentCache::Guards::ObjCount do
|
4
|
+
let(:cache_component_stub) do
|
5
|
+
double.tap do |cache_component_stub|
|
6
|
+
cache_component_stub.stub(:cache_key) do |input|
|
7
|
+
input.inspect
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:count) { 12314 }
|
13
|
+
|
14
|
+
let(:obj_stub) do
|
15
|
+
double.tap do |obj_stub|
|
16
|
+
obj_stub.stub(:scoped).and_return(obj_stub)
|
17
|
+
obj_stub.stub(:where).and_return(obj_stub)
|
18
|
+
obj_stub.stub(:count).and_return(count)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
before { InfoparkComponentCache::CmsStateGuard.obj_root_class = obj_stub }
|
23
|
+
|
24
|
+
subject { described_class.new(cache_component_stub) }
|
25
|
+
|
26
|
+
context "with cache disabled" do
|
27
|
+
disable_cache
|
28
|
+
|
29
|
+
context "without a call to guard!" do
|
30
|
+
it { is_expected.not_to be_consistent }
|
31
|
+
end
|
32
|
+
|
33
|
+
context "with a call to guard!" do
|
34
|
+
before { subject.guard! }
|
35
|
+
it { is_expected.not_to be_consistent }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "with cache enabled" do
|
40
|
+
enable_cache
|
41
|
+
before { Rails.cache.clear }
|
42
|
+
|
43
|
+
context "without a call to guard!" do
|
44
|
+
it { is_expected.not_to be_consistent }
|
45
|
+
end
|
46
|
+
|
47
|
+
context "with a call to guard!" do
|
48
|
+
before { subject.guard! }
|
49
|
+
it { is_expected.to be_consistent }
|
50
|
+
end
|
51
|
+
|
52
|
+
context "after obj count increases" do
|
53
|
+
before { subject.guard! }
|
54
|
+
before { obj_stub.stub(:count).and_return(55555) }
|
55
|
+
it { is_expected.not_to be_consistent }
|
56
|
+
end
|
57
|
+
|
58
|
+
context "after obj count decreases" do
|
59
|
+
before { subject.guard! }
|
60
|
+
before { obj_stub.stub(:count).and_return(500) }
|
61
|
+
it { is_expected.not_to be_consistent }
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe InfoparkComponentCache::Guards::ValidFrom do
|
4
|
+
let(:cache_component_stub) do
|
5
|
+
double.tap do |cache_component_stub|
|
6
|
+
cache_component_stub.stub(:cache_key) do |input|
|
7
|
+
input.inspect
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:minimum_valid_from) { 10.minutes.since.to_iso }
|
13
|
+
|
14
|
+
let(:obj_stub) do
|
15
|
+
double.tap do |obj_stub|
|
16
|
+
obj_stub.stub(:scoped).and_return(obj_stub)
|
17
|
+
obj_stub.stub(:where).and_return(obj_stub)
|
18
|
+
obj_stub.stub(:minimum) do |field|
|
19
|
+
minimum_valid_from if field == :valid_from
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
before { InfoparkComponentCache::CmsStateGuard.obj_root_class = obj_stub }
|
25
|
+
|
26
|
+
subject { described_class.new(cache_component_stub) }
|
27
|
+
|
28
|
+
context "with cache disabled" do
|
29
|
+
disable_cache
|
30
|
+
|
31
|
+
context "without a call to guard!" do
|
32
|
+
it { is_expected.not_to be_consistent }
|
33
|
+
end
|
34
|
+
|
35
|
+
context "with a call to guard!" do
|
36
|
+
before { subject.guard! }
|
37
|
+
it { is_expected.not_to be_consistent }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "with cache enabled" do
|
42
|
+
enable_cache
|
43
|
+
before { Rails.cache.clear }
|
44
|
+
|
45
|
+
context "without a call to guard!" do
|
46
|
+
it { is_expected.not_to be_consistent }
|
47
|
+
end
|
48
|
+
|
49
|
+
context "with a call to guard!" do
|
50
|
+
before { subject.guard! }
|
51
|
+
it { is_expected.to be_consistent }
|
52
|
+
end
|
53
|
+
|
54
|
+
context "after minimum valid from changes to a present date" do
|
55
|
+
before { subject.guard! }
|
56
|
+
before { obj_stub.stub(:minimum).and_return(Time.now.to_iso) }
|
57
|
+
it { is_expected.not_to be_consistent }
|
58
|
+
end
|
59
|
+
|
60
|
+
context "after minimum valid from changes to a past date" do
|
61
|
+
before { subject.guard! }
|
62
|
+
before { obj_stub.stub(:minimum).and_return(1.month.ago.to_iso) }
|
63
|
+
it { is_expected.not_to be_consistent }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe InfoparkComponentCache::Guards::ValidUntil do
|
4
|
+
let(:cache_component_stub) do
|
5
|
+
double.tap do |cache_component_stub|
|
6
|
+
cache_component_stub.stub(:cache_key) do |input|
|
7
|
+
input.inspect
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:minimum_valid_until) { 10.minutes.since.to_iso }
|
13
|
+
|
14
|
+
let(:obj_stub) do
|
15
|
+
double.tap do |obj_stub|
|
16
|
+
obj_stub.stub(:scoped).and_return(obj_stub)
|
17
|
+
obj_stub.stub(:where).and_return(obj_stub)
|
18
|
+
obj_stub.stub(:minimum) do |field|
|
19
|
+
minimum_valid_until if field == :valid_until
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
before { InfoparkComponentCache::CmsStateGuard.obj_root_class = obj_stub }
|
25
|
+
|
26
|
+
subject { described_class.new(cache_component_stub) }
|
27
|
+
|
28
|
+
context "with cache disabled" do
|
29
|
+
disable_cache
|
30
|
+
|
31
|
+
context "without a call to guard!" do
|
32
|
+
it { is_expected.not_to be_consistent }
|
33
|
+
end
|
34
|
+
|
35
|
+
context "with a call to guard!" do
|
36
|
+
before { subject.guard! }
|
37
|
+
it { is_expected.not_to be_consistent }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "with cache enabled" do
|
42
|
+
enable_cache
|
43
|
+
before { Rails.cache.clear }
|
44
|
+
|
45
|
+
context "without a call to guard!" do
|
46
|
+
it { is_expected.not_to be_consistent }
|
47
|
+
end
|
48
|
+
|
49
|
+
context "with a call to guard!" do
|
50
|
+
before { subject.guard! }
|
51
|
+
it { is_expected.to be_consistent }
|
52
|
+
end
|
53
|
+
|
54
|
+
context "after minimum valid until changes to a present date" do
|
55
|
+
before { subject.guard! }
|
56
|
+
before { obj_stub.stub(:minimum).and_return(Time.now.to_iso) }
|
57
|
+
it { is_expected.not_to be_consistent }
|
58
|
+
end
|
59
|
+
|
60
|
+
context "after minimum valid until changes to a past date" do
|
61
|
+
before { subject.guard! }
|
62
|
+
before { obj_stub.stub(:minimum).and_return(1.month.ago.to_iso) }
|
63
|
+
it { is_expected.not_to be_consistent }
|
64
|
+
end
|
65
|
+
|
66
|
+
context "nil valid until" do
|
67
|
+
let(:minimum_valid_until) { nil }
|
68
|
+
|
69
|
+
before { subject.guard! }
|
70
|
+
it { is_expected.to be_consistent }
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
# Load dummy app
|
3
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
4
|
+
# Load rspec components
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'byebug'
|
7
|
+
# Nice backtraces
|
8
|
+
Rails.backtrace_cleaner.remove_silencers!
|
9
|
+
# Load support files
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
11
|
+
|
12
|
+
# configure rspec
|
13
|
+
RSpec.configure do |config|
|
14
|
+
config.mock_with :rspec
|
15
|
+
config.use_transactional_fixtures = true
|
16
|
+
config.infer_base_class_for_anonymous_controllers = false
|
17
|
+
config.order = "random"
|
18
|
+
config.extend CacheSwitchingMacros
|
19
|
+
config.expect_with :rspec do |c|
|
20
|
+
c.syntax = [:should, :expect]
|
21
|
+
end
|
22
|
+
config.mock_with :rspec do |c|
|
23
|
+
c.syntax = [:should, :expect]
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module CacheSwitchingMacros
|
2
|
+
def enable_cache(trigger=:all)
|
3
|
+
before(trigger) do
|
4
|
+
@__perform_caching_before ||= []
|
5
|
+
@__perform_caching_before.push Rails.application.config.action_controller.perform_caching
|
6
|
+
Rails.application.config.action_controller.perform_caching = true
|
7
|
+
end
|
8
|
+
|
9
|
+
after(trigger) do
|
10
|
+
@__perform_caching_before ||=[]
|
11
|
+
previous_setting = @__perform_caching_before.pop || false
|
12
|
+
Rails.application.config.action_controller.perform_caching = previous_setting
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def disable_cache(trigger=:all)
|
17
|
+
before(trigger) do
|
18
|
+
@__perform_caching_before ||= []
|
19
|
+
@__perform_caching_before.push Rails.application.config.action_controller.perform_caching
|
20
|
+
Rails.application.config.action_controller.perform_caching = false
|
21
|
+
end
|
22
|
+
|
23
|
+
after(trigger) do
|
24
|
+
@__perform_caching_before ||=[]
|
25
|
+
previous_setting = @__perform_caching_before.pop || false
|
26
|
+
Rails.application.config.action_controller.perform_caching = previous_setting
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,76 +1,95 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_component_cache
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 1.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Tomasz Przedmojski
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: infopark_fiona_connector
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
27
31
|
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
33
34
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: infopark_rails_connector
|
37
35
|
prerelease: false
|
38
|
-
|
39
|
-
|
40
|
-
requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
41
38
|
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
- !ruby/object:Gem::
|
50
|
-
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
51
49
|
prerelease: false
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sqlite3
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
55
59
|
- - ">="
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
version: "0"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
61
62
|
type: :development
|
62
|
-
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: byebug
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
63
83
|
description: Easy and intelligent fragment caching for RailsConnector projects
|
64
|
-
email:
|
84
|
+
email:
|
65
85
|
- tomasz.przedmojski@infopark.de
|
66
86
|
executables: []
|
67
|
-
|
68
87
|
extensions: []
|
69
|
-
|
70
88
|
extra_rdoc_files: []
|
71
|
-
|
72
|
-
|
73
|
-
- .
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".ruby-version"
|
74
93
|
- Gemfile
|
75
94
|
- LICENSE.txt
|
76
95
|
- README.md
|
@@ -79,11 +98,18 @@ files:
|
|
79
98
|
- infopark_component_cache.gemspec
|
80
99
|
- lib/engine.rb
|
81
100
|
- lib/infopark_component_cache.rb
|
101
|
+
- lib/infopark_component_cache/abstract_cache_storage.rb
|
82
102
|
- lib/infopark_component_cache/cache_storage.rb
|
83
103
|
- lib/infopark_component_cache/component.rb
|
84
104
|
- lib/infopark_component_cache/component_cache.rb
|
85
105
|
- lib/infopark_component_cache/consistency_guard.rb
|
106
|
+
- lib/infopark_component_cache/delayed_guard.rb
|
86
107
|
- lib/infopark_component_cache/guards/always_consistent.rb
|
108
|
+
- lib/infopark_component_cache/guards/cms_state_guard.rb
|
109
|
+
- lib/infopark_component_cache/guards/delayed_last_changed.rb
|
110
|
+
- lib/infopark_component_cache/guards/delayed_obj_count.rb
|
111
|
+
- lib/infopark_component_cache/guards/delayed_valid_from.rb
|
112
|
+
- lib/infopark_component_cache/guards/delayed_valid_until.rb
|
87
113
|
- lib/infopark_component_cache/guards/last_changed.rb
|
88
114
|
- lib/infopark_component_cache/guards/never_consistent.rb
|
89
115
|
- lib/infopark_component_cache/guards/obj_count.rb
|
@@ -92,39 +118,81 @@ files:
|
|
92
118
|
- lib/infopark_component_cache/guards/value_present.rb
|
93
119
|
- lib/infopark_component_cache/key_generator.rb
|
94
120
|
- lib/infopark_component_cache/version.rb
|
95
|
-
|
96
|
-
|
121
|
+
- lib/infopark_component_cache/volatile_cache.rb
|
122
|
+
- lib/infopark_component_cache/volatile_cache_storage.rb
|
123
|
+
- spec/dummy/Rakefile
|
124
|
+
- spec/dummy/app/controllers/application_controller.rb
|
125
|
+
- spec/dummy/app/models/obj.rb
|
126
|
+
- spec/dummy/config.ru
|
127
|
+
- spec/dummy/config/application.rb
|
128
|
+
- spec/dummy/config/boot.rb
|
129
|
+
- spec/dummy/config/database.yml
|
130
|
+
- spec/dummy/config/environment.rb
|
131
|
+
- spec/dummy/config/environments/development.rb
|
132
|
+
- spec/dummy/config/environments/test.rb
|
133
|
+
- spec/dummy/config/initializers/secret_token.rb
|
134
|
+
- spec/dummy/config/initializers/session_store.rb
|
135
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
136
|
+
- spec/dummy/config/routes.rb
|
137
|
+
- spec/dummy/db/development.sqlite3
|
138
|
+
- spec/dummy/db/schema.rb
|
139
|
+
- spec/dummy/log/.gitkeep
|
140
|
+
- spec/lib/delayed_guard_spec.rb
|
141
|
+
- spec/lib/guards/always_consistent_spec.rb
|
142
|
+
- spec/lib/guards/last_changed_spec.rb
|
143
|
+
- spec/lib/guards/never_consistent_spec.rb
|
144
|
+
- spec/lib/guards/obj_count_spec.rb
|
145
|
+
- spec/lib/guards/valid_from_spec.rb
|
146
|
+
- spec/lib/guards/valid_until_spec.rb
|
147
|
+
- spec/spec_helper.rb
|
148
|
+
- spec/support/cache_switching_macros.rb
|
149
|
+
homepage: ''
|
97
150
|
licenses: []
|
98
|
-
|
151
|
+
metadata: {}
|
99
152
|
post_install_message:
|
100
153
|
rdoc_options: []
|
101
|
-
|
102
|
-
require_paths:
|
154
|
+
require_paths:
|
103
155
|
- lib
|
104
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
-
|
106
|
-
requirements:
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
107
158
|
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
version: "0"
|
113
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
116
163
|
- - ">="
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
|
119
|
-
segments:
|
120
|
-
- 0
|
121
|
-
version: "0"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
122
166
|
requirements: []
|
123
|
-
|
124
167
|
rubyforge_project:
|
125
|
-
rubygems_version:
|
168
|
+
rubygems_version: 2.2.3
|
126
169
|
signing_key:
|
127
|
-
specification_version:
|
170
|
+
specification_version: 4
|
128
171
|
summary: Fragment caching with automatic dependency resolution and cache invalidation.
|
129
|
-
test_files:
|
130
|
-
|
172
|
+
test_files:
|
173
|
+
- spec/dummy/Rakefile
|
174
|
+
- spec/dummy/app/controllers/application_controller.rb
|
175
|
+
- spec/dummy/app/models/obj.rb
|
176
|
+
- spec/dummy/config.ru
|
177
|
+
- spec/dummy/config/application.rb
|
178
|
+
- spec/dummy/config/boot.rb
|
179
|
+
- spec/dummy/config/database.yml
|
180
|
+
- spec/dummy/config/environment.rb
|
181
|
+
- spec/dummy/config/environments/development.rb
|
182
|
+
- spec/dummy/config/environments/test.rb
|
183
|
+
- spec/dummy/config/initializers/secret_token.rb
|
184
|
+
- spec/dummy/config/initializers/session_store.rb
|
185
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
186
|
+
- spec/dummy/config/routes.rb
|
187
|
+
- spec/dummy/db/development.sqlite3
|
188
|
+
- spec/dummy/db/schema.rb
|
189
|
+
- spec/dummy/log/.gitkeep
|
190
|
+
- spec/lib/delayed_guard_spec.rb
|
191
|
+
- spec/lib/guards/always_consistent_spec.rb
|
192
|
+
- spec/lib/guards/last_changed_spec.rb
|
193
|
+
- spec/lib/guards/never_consistent_spec.rb
|
194
|
+
- spec/lib/guards/obj_count_spec.rb
|
195
|
+
- spec/lib/guards/valid_from_spec.rb
|
196
|
+
- spec/lib/guards/valid_until_spec.rb
|
197
|
+
- spec/spec_helper.rb
|
198
|
+
- spec/support/cache_switching_macros.rb
|