Cache user

Add cache user for save SQL queries
(fix undefined $uid)