No!
Every extra place you store a password (or password hash which is still sensitive) is another place that they can leak from. This is one of the reasons why SSL pages are not cached: because sensitive information should not be cached.
Good authentication code (like the sort you find in SSH) even goes to the effort of marking the memory region in which the password is stored as unswappable so it can't be written to disk by the operating system.
The risk of sensitive data leaking from this cache may be low but by doing this you have increased the risk. By placing this data in a local PHP file, it can now be accessed by any local file inclusion vulnerability. It may take more than just the local file inclusion to actually echo the passwords out to the screen. Before this cache existed, an SQL injection vulnerability or a complete server compromise was probably required to even access the password hashes, now those and local file inclusion can access the hashes.
It is fine to store other, less sensitive data in multiple places to improve page load speeds but passwords and password hashes should be off limits.
You can avoid having to calculate and look up the password hash on every page load for authenticated users by storing an authentication token. This should be randomly generated (so it's difficult to predict) at login time and should be short-lived. This is exactly what a PHP session ID is and it is perfectly adequate to verify that your users are properly authenticated after the first check where you compare passwords.
It just occurred to me that if you are querying the database and calculating the password hash on every page load, you must have stored the password (or potentially password hash) with the client somewhere, probably in the cookie and this sensitive data is being sent over the internet for every page request. This is bad practice in general and will result in the password (or password hash) being saved on the user's hard drive and potentially intermediate proxies unless you are using SSL for every page.
P.S.
I'm curious why including a local file is noticeably faster than what should be a simple key-value lookup from your database. My guess is you either have horrendous latency on your network or contention on your users table. Either one really needs fixing.