Skip to content

document.reload should not read from cache #144

Description

@thilo

In order to get the latest version of a document, document.reload should not use the cache when set. e.g. this is important in cases where you want to avoid conflicts across processes.

failing test for caching_spec.rb

  it 'does not use the cache for reloads' do
    expect(couchrest_db).to receive(:get).with('1').exactly(2).times
    doc = db.load_document '1'
    doc.reload
  end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions