MDL-37500 cache: implemented sharing options and gui

Conflicts:
	cache/classes/definition.php
Temp