sessionm-cassandra_object 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -21,13 +21,15 @@ module CassandraObject
|
|
21
21
|
|
22
22
|
Cassandra.new(spec[:keyspace], spec[:servers], spec[:thrift]).tap do |conn|
|
23
23
|
conn.disable_node_auto_discovery! if spec[:disable_node_auto_discovery]
|
24
|
-
if
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
if spec[:cache_schema]
|
25
|
+
if @@schema
|
26
|
+
conn.instance_variable_set '@schema', @@schema
|
27
|
+
else
|
28
|
+
begin
|
29
|
+
@@schema = conn.schema
|
30
|
+
rescue CassandraThrift::InvalidRequestException => e
|
31
|
+
# initially the schema doesn't exists
|
32
|
+
end
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|