laravel-cash icon indicating copy to clipboard operation
laravel-cash copied to clipboard

Feedback/question

Open fideloper opened this issue 10 years ago • 1 comments

Pretty neat! I like that idea.

My first question: Does this assume you're using php5-fpm? I often use it with a socket rather than passing it to a localhost URL (but I believe that's simply a configuration thing related to how PHP gets a request, not necessarily a issue with this project). That might be something to explain though.

My nginx config for fastcgi_pass looks like this:

fastcgi_pass unix:/var/run/php5-fpm.sock;

(I don't believe it matters, it's just a configuration to note that might confuse users)

My second question: Your code needs to generate a key based on the URI, correct? Do you know of instances where the code may incorrectly guess the URI that nginx built? (I'm wondering if there are ever inconsistencies, leading to a cache key that PHP cannot invalidate as it doesn't re-create it successfully?)

Lastly I think a little more explanation on what Cache::rule is doing would be helpful. I'm a little confused on if it only needs to be called to invalidate a route, or if it's something you keep in your routes.php at all times? (Perhaps renaming the function to something like Cache::clear() or something?). Again, that's likely just my confusion, but some more explanation there may help.

Everything looks cool tho, I like that as a way to cache content. It can really be PHP-agnostic as well, since the caching is on the Nginx level. In that regard, people should at least know that's possible :D

Hope this is useful feedback!

fideloper avatar Jan 13 '14 12:01 fideloper