Improved speed for getting period from memorycache.

Signed-off-by: Michel <info@1st-setup.nl>