Sha256: 131c2af67a65ff720cb46e9a7ec46ecc7ff8d0ebe074c2c0a2b5522a94dabedd

Contents?: true

Size: 466 Bytes

Versions: 4

Compression:

Stored size: 466 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.
#
module CouchRest::Model
  module Support
    module Database

      def delete!
        Thread.current[:couchrest_design_cache] = { }
        super
      end

    end
  end
end

class CouchRest::Database
  include(CouchRest::Model::Support::Database)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
couchrest_model-2.2.0.beta1 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.1.0.rc1 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.1.0.beta2 lib/couchrest/model/support/couchrest_database.rb
couchrest_model-2.1.0.beta1 lib/couchrest/model/support/couchrest_database.rb