This is to make the access to X server more explicit, and make managing
the lifetime of xcb_connection_t a bit easier.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
cache uses an invasive design now, a la list.h and uthash. This get rid
of the ugly integer to pointer cache, and gives us freedom of what we
can put into the cache.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Added a pure version of `cache_get` which does not change the cache, and
renamed the old `cache_get` to `cache_get_or_fetch`.
Remove unused `cache_set`, and remove prefix underscore from function
names.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>