[*] Core Class cache saved only once and only if cache was changed

Cache is written on disk only one per script execution and only if cache content were changed (i.e. they are new classes)