Skip to content

set expiration date for web resource #36

@LiNk-NY

Description

@LiNk-NY

Hi Lori, @lshep

Is it possible to set an expiration date for a URL resource within the bfcadd function or any other function?
I tried this and it doesn't work.

library(BiocFileCache)
#> Loading required package: dbplyr
bfc <- BiocFileCache()
tfile <- "https://bioconductor.org/checkResults/3.15/bioc-LATEST/report.tgz"
treport <- bfcadd(
    bfc, rname = tfile, fpath = tfile, expires = Sys.Date() + 2
)
res <- bfcquery(bfc, tfile, exact = TRUE)
res
#>   id  rid                                                             rname
#> 1  9 BFC9 https://bioconductor.org/checkResults/3.15/bioc-LATEST/report.tgz
#>           create_time         access_time                    rpath rtype
#> 1 2022-01-11 23:04:43 2022-01-11 23:04:48 179285b1b6faf_report.tgz   web
#>                                                               fpath
#> 1 https://bioconductor.org/checkResults/3.15/bioc-LATEST/report.tgz
#>    last_modified_time                  etag expires
#> 1 2022-01-10 16:08:46 77b841f-5d53c8d250fe7      NA

Created on 2022-01-11 by the reprex package (v2.0.1.9000)

Thanks!
-Marcel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions