georeferencer 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c36acb7c922b9cdde371dcd61b912997564086240eedcb9d1424760ce6411ab
4
- data.tar.gz: c936576f11136ba034ee89c579927616ec3a39f9302220d1254c46d8832edac8
3
+ metadata.gz: 8f9f94318c12d86161d527a1d18146596f641eaf2003a013cfe0f4eb88fa2113
4
+ data.tar.gz: 28206df2f5aa4ecb8c66b390565378191fe38eeb4274321010196939b9d2a24c
5
5
  SHA512:
6
- metadata.gz: 2bde55a400962aa06bf64b1c0e1a2177ceeb540f04f8b6883a22c16a2c87ce257a7a635b0c1c8e633275844bd3942b1245057c041eb15344f5c4283961f97a03
7
- data.tar.gz: f55550f2005005905e6ca2249291c22520daad23fb33e6491d6ffb479517b59edcf891657929f73ec2f3320f37fa34c7fe9183e9a500d68e28d3f3be9a8bf66e
6
+ metadata.gz: daf926e877d7e27486c03a6cf96d22bd6867959c2ec92cdb2b080fc3a18d388d574a6fe2341db585e84340daa6df58730b9342388aa93665852d713337a12ff3
7
+ data.tar.gz: bd9c85a3a19948a66f10e402c50267360a53260188769081dede6e74cfdd31fbfadc15bcd329be5175985cf3505375a07231cfeccf8c3e4e76c148f6388b0cd8
@@ -25,6 +25,8 @@ module Georeferencer
25
25
 
26
26
  module ClassMethods
27
27
 
28
+ attr_accessor :perform_object_caching
29
+
28
30
  # Base of the cache key for this class.
29
31
  def cache_key_base
30
32
  "georeferencer/#{Georeferencer::VERSION}/#{self.to_s.underscore}"
@@ -32,7 +34,7 @@ module Georeferencer
32
34
 
33
35
  # Redeclare the find() method, with caching. Only pass uncached keys to the super method.
34
36
  def find(*ids)
35
- if Georeferencer.configuration.perform_caching
37
+ if Georeferencer.configuration.perform_caching && perform_object_caching != false
36
38
  ids.uniq!
37
39
  uncached_ids = ids.reject {|i| Georeferencer.configuration.cache.read("#{cache_key_base}/#{i}").present?}
38
40
  [super(*uncached_ids)].flatten.reject(&:blank?).collect do |object|
@@ -4,6 +4,7 @@ module Georeferencer
4
4
 
5
5
  collection_path "progress"
6
6
  resource_path "progress?collection=:id"
7
+ self.perform_object_caching = false
7
8
 
8
9
 
9
10
  def self.all
@@ -1,3 +1,3 @@
1
1
  module Georeferencer
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: georeferencer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Jones