apache / apache/couchdb

ETags support for views

Open
#3,911 4 comments 2 reactions 0 assignees View on GitHub
bug needs-triage
Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
1d 16h
Merged PRs (30d)
9

Description

[NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )

## Description

We have been looking for support for ETags similar to what individual docs support using the `If-None-Match` header.
Currently, to simulate a `304 Not Modified` behavior, we're calling views using these args,

` ping_args = {
"stable": "true",
"update_seq": "true",
"limit": "0" }`

and then, using the returned updated sequence adjoined with the view name to create a key for caching, and returning the cached result unless the updated sequence has changed.

Since the docs imply that views do support Etags, it's just confusing to us as to the position of the CouchDB team on this issue

It'd be nice if this issue gets bumped !

## Expected Behaviour

[NOTE]: # ( Tell us what you expected to happen. )
Updating the docs to represent the current support of ETags by views
or, fixing ETags support for views.

## Your Environment

* CouchDB version used: 3.2.1
* Operating system and version: Ubuntu 20.04

Contributor guide

Open the contributing guide

Research direction

Start by tracing the view HTTP endpoint and its handling of the If-None-Match header, then compare that behavior with the documentation's ETag claims. Check the existing view request using stable, update_seq, and limit; done means either documenting the current behavior accurately or verifying 304 responses for view requests with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
api, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.