a <- Cache(rnorm(1))
.addTagsRepo(cacheId = gsub("cacheId:", "", attr(a, "tags")),
tagKey = "status", tagValue = "processed")
showCache() # last entry is the above line
a <- Cache(rnorm(1))
# Update an existing tag
.updateTagsRepo(cacheId = gsub("cacheId:", "", attr(a, "tags")),
tagKey = "status", tagValue = "second")
# Add a tag if it doesn't exist
.updateTagsRepo(cacheId = gsub("cacheId:", "", attr(a, "tags")),
tagKey = "status", tagValue = "new", add = TRUE)
Run the code above in your browser using DataLab