Sha256: 3e40250b524680fe969083b2479722a4e97dd8a275707b53255712f9212023e5

Contents?: true

Size: 348 Bytes

Versions: 12

Compression:

Stored size: 348 Bytes

Contents

#
# Extend CouchRest's normal database delete! method to ensure any caches are
# also emptied. Given that this is a rare event, and the consequences are not 
# very severe, we just completely empty the cache.
#
CouchRest::Database.class_eval do

  def delete!
    Thread.current[:couchrest_design_cache] = { }
    CouchRest.delete @root
  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
couchrest_model-2.0.4 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.0.3 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.0.1 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.0.0 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.0.0.beta2 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.0.0.beta lib/couchrest/model/support/couchrest_database.rb
couchrest_model-1.2.0.beta lib/couchrest/model/support/couchrest_database.rb
openlogic-couchrest_model-1.0.0 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-1.1.2 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-1.1.1 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-1.1.0 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-1.1.0.rc1 lib/couchrest/model/support/couchrest_database.rb