lib/riak/bucket.rb in riak-client-0.9.4 vs lib/riak/bucket.rb in riak-client-0.9.5
- old
+ new
@@ -49,9 +49,10 @@
# @option options [Boolean] :reload (false) If present, will force reloading of the bucket's keys from Riak
# @return [Array<String>] Keys in this bucket
def keys(options={}, &block)
if block_given?
@client.backend.list_keys(self, &block)
+ @keys = nil
elsif @keys.nil? || options[:reload]
@keys = @client.backend.list_keys(self)
end
@keys
end