Camen Design Forum

PHP and filesystem efficiency?

Johann

"BTW, if you're caching POST requests, wouldn't you have to throw the entire raw request body into the hash?"

Well yeah, that is, I just json_encode() the $_POST array and append that to the input for the hash. It's a bit overkill because it only ever ends up being used for the search, but it's the only way I could see to allow for that.

"Part of the reason I'm caching pages is so I don't have to access a DB at all."

Sure, but in my case the startup time (include() and init) comes close to the cost of the MySQL connection, so I figured to not care about those 10-15 miliseconds and enjoy all the convenience doing that in the database offers :)

Not to hijack the thread though (at least not until your question has been answered :D)

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn