add cache to improve performance

for those get config, check admin permission, get site id, check site
enable, and more...
make them use cache to reduce connection to database.
this can improve performance and reduce time load to about 70%.