soar_ldap 0.0.3 → 0.0.4
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/lib/soar_ldap/version.rb +1 -1
- data/lib/soar_ldap.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63658e6893f282a62f703a2e6c1d5f5734d94008
|
|
4
|
+
data.tar.gz: 95999804011b2260bfd7d1e39f05659562686135
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6877f14f3bacda03e3d02bea9d0480bc5b7eb0b07f3ed84ea1572789151f1c9eaf986fcf0a9638d321b77bb8fa802741646bc70a45207fa4229ab37237c29962
|
|
7
|
+
data.tar.gz: 0404f937502e379f798d163520c66dfbf3b23becb0ea346a1cb59c6a98c3396061807aa876acf4baa86cc7f072bd424bd3444d061d5e16aa50bcf891c1b0d86e
|
data/lib/soar_ldap/version.rb
CHANGED
data/lib/soar_ldap.rb
CHANGED
|
@@ -28,9 +28,7 @@ module SoarLdap
|
|
|
28
28
|
@configuration = nil
|
|
29
29
|
validate_configuration(configuration)
|
|
30
30
|
remember_configuration(configuration)
|
|
31
|
-
|
|
32
|
-
@freshness ||= 0
|
|
33
|
-
@cache = ::Persistent::Cache.new("soar_ldap", @freshness, Persistent::Cache::STORAGE_RAM)
|
|
31
|
+
initialize_cache(configuration)
|
|
34
32
|
end
|
|
35
33
|
|
|
36
34
|
def bootstrapped?
|
|
@@ -136,5 +134,11 @@ module SoarLdap
|
|
|
136
134
|
@cache[connection.to_s] ||= {}
|
|
137
135
|
@cache[connection.to_s][identifier] = result
|
|
138
136
|
end
|
|
137
|
+
|
|
138
|
+
def initialize_cache(configuration)
|
|
139
|
+
@freshness = configuration['freshness']
|
|
140
|
+
@freshness ||= 0
|
|
141
|
+
@cache = ::Persistent::Cache.new("soar_ldap", @freshness, Persistent::Cache::STORAGE_RAM)
|
|
142
|
+
end
|
|
139
143
|
end
|
|
140
144
|
end
|