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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f9f94318c12d86161d527a1d18146596f641eaf2003a013cfe0f4eb88fa2113
|
4
|
+
data.tar.gz: 28206df2f5aa4ecb8c66b390565378191fe38eeb4274321010196939b9d2a24c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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|
|