Cache improvement and fixes

+ Now we use `System::sanitize_id`
+ Refactoring. Rename `_regxp_pattern` to `_regexp_pattern` and move it to `Cache` class
+ PHPDoc fixes & additions
+ Some cleanups