e08_refresh_cache_v1#
Feature:
No matter what user entered, always return a random value between 1 and 100. And this value is based on cache that won’t change while user is typing. However, we want to provide a way to refresh the value. User can type “!~” and then hit ENTER to refresh the value. When user hit ENTER, it automatically removes the “!~” part and recover the original query.
Difficulty: Hard
Dependencies: NA
Demo: https://asciinema.org/a/631197
- class zelfred.gallery.e08_refresh_cache_v1.RefreshItem(title: str, subtitle: ~typing.Optional[str] = None, uid: str = <factory>, arg: ~typing.Optional[str] = None, autocomplete: ~typing.Optional[str] = None, variables: ~typing.Dict[str, ~typing.Any] = <factory>)[source]#
Represent an item that can refresh cache in the dropdown menu.