I use a class in PHP, that stores some Prepared Statements. I usually use one Statement per Request. Is there a efficient way to cache this class, the connection and the statements? I already looked at APCu, but it doesn’t seem right to me. Thanks in advance!
Asked
Active
Viewed 233 times
1
-
2What do you mean by "cache"? Store the output? If so, what's your cache invalidation model? What's wrong with MySQL's caching mechanism? – symcbean Mar 14 '18 at 12:56
-
By cache I mean storing the PDO object or the prepared statements. – Profilüfter Mar 14 '18 at 15:49
1 Answers
1
No, there is no way to cache it between requests, because prepared statement is bound to a resource and you cannot persist resources between requests.

Your Common Sense
- 156,878
- 40
- 214
- 345