openml / openml/OpenML

Caching headers on data

Open
#1,030 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
755
Forks
128
PR merge metrics
No merged PRs in 30d

Description

When I am trying to download a dataset, like https://www.openml.org/data/get_csv/61/dataset_61_iris.arff, the HTTP headers do not help with caching:

HTTP/1.1 200 OK
Date: Tue, 03 Dec 2019 23:24:56 GMT
Server: Apache/2.4.29 (Ubuntu)
Set-Cookie: ci_session=tn9ucdbuum857upd4j89otpgvv4fv9jh; expires=Wed, 04-Dec-2019 01:24:56 GMT; Max-Age=7200; path=/; HttpOnly
Expires: 0
Cache-Control: must-revalidate
Pragma: public
Content-Description: File Transfer
Content-Disposition: attachment; filename=dataset_61_iris.csv
Content-Transfer-Encoding: binary
Connection: keep-alive
Keep-Alive: timeout=300, max=500
Vary: Accept-Encoding
Content-Length: 4612
Content-Type: text/plain;charset=UTF-8

Why is Cache-Control set to must-revalidate?

I suggest you emit ETag (you can use md5_checksum) and allow caching.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the dataset download endpoint shown in the report and trace where its HTTP response headers are generated. Check how md5_checksum can support an ETag and verify the response's caching behavior, including conditional requests, against the example dataset URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend, data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.