support CMAKE_<LANG>_... variables

#197 , solve the LANG issue first,

the PROJECT is harder, will solve it later after this pull request.
Could you explain the need for using the cache? What operations are particularly expensive?

Why invalidate it in 10 minutes? What part of it can become stale? Can't we invalidate it on some specific value?