changed the cache login order for functions decorations

Signed-off-by: Alexander Skjolden <alex@plastboks.net>