Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Force cache invalidation on API version change

Open
#252 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
kotlin
Domain
api

Research direction

Start by tracing how the Retrofit cache is stored and where the API version is detected. Decide how the current version will be persisted, then verify that a detected version change invalidates the cache without requiring the consumer to expose the API version; the proposed KeyValueStorage interface is one option mentioned in the issue.

Written by the indexing model from the issue text.

Description

bug
Issue Summary

When the API version changes, the cache is not cleared. This creates a potential for serialization crashes due to changes in object representations.

Suggested Improvements

Since the API version is no longer exposed to the library consumer, we should invalidate the retrofit cache when we detect an API version change internally. This will require us to persist the current version of the API to disk. We should do this either using a flat file (since this is a java library) or force the consumer to provide an implementation of an interface that writes and retrieves key value pairs to disk.

interface KeyValueStorage {
    fun storeStringForKey(key: String, value: String?)

    fun retrieveStringForKey(key: String): String?
}

Then we will force cache invalidation any time we detect a change in the API Version.

Dominant language
Kotlin
Stars
128
Forks
48
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from vimeo/vimeo-networking-java

All issues in vimeo/vimeo-networking-java

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.