Bugfix: init user cache

Signed-off-by: Heikki Salo <heikki.ao.salo@iki.fi>
Refactor and document a bit

Signed-off-by: Heikki Salo <heikki.ao.salo@iki.fi>
Move file

Signed-off-by: Heikki Salo <heikki.ao.salo@iki.fi>
Docstring

Signed-off-by: Heikki Salo <heikki.ao.salo@iki.fi>