Skip to content

Add some primitive docstrings and a TTL check#1

Open
DaRealCodeWritten wants to merge 1 commit into
kengreim:mainfrom
DaRealCodeWritten:main
Open

Add some primitive docstrings and a TTL check#1
DaRealCodeWritten wants to merge 1 commit into
kengreim:mainfrom
DaRealCodeWritten:main

Conversation

@DaRealCodeWritten
Copy link
Copy Markdown

No description provided.

@kengreim
Copy link
Copy Markdown
Owner

Only reason I'm holding off on this is that I just realized the current structure outlined below doesn't work if get_cached() returns an error on stale data:

  1. Call to an accessing method like pilots(update_mode=UpdateMode.NOUPDATE) which signifies that we explicitly do not want to update the cache, regardless of data staleness
  2. Those accessing methods will then call one of the _return methods which uses get_cached(). If it throws an error there on stale data, we won't get a returned value even though the original call said it was fine to just get cached data

I'm not sure what the best way to fix this is. Maybe get_cached() should also have some kind of override flag? Does the "staleness" check in get_cached() even matter? My first thought was that it would be helpful, but kind of by definition of the function name, we know we're getting cached data here that could be stale...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants