Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document.reload should not read from cache #144

Open
thilo opened this issue Jan 22, 2021 · 0 comments
Open

document.reload should not read from cache #144

thilo opened this issue Jan 22, 2021 · 0 comments

Comments

@thilo
Copy link
Contributor

thilo commented Jan 22, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant