Replies: 1 comment 1 reply
-
Hey! Sorry for such a slow reply. I've fallen behind with a few things, so I'm just trying to catch up now haha. I'm definitely open to the idea of this. But I can't quite decide whether it's something that should be baked into the package or added in app code. The original intention of the package was that it'd fetch favicon URLs that would probably be passed to a web browser for displaying in a webpage. So I was using the caching to prevent the calls from our app server to an external site. Then I was relying on the web browser for caching the favicons for us. But of course, this was just my original intention for my own use case. So it probably doesn't fit everyone's use case. I reckon if you can give me a bit more context on where you'd use this type of functionality, we can probably come up with something really nice and get it added to the package 😄 |
Beta Was this translation helpful? Give feedback.
-
First, thank you for this great package. I was planning to implement something similar to this myself, and then I found out about this package through Laravel-News.com.
I want to be able to cache not only the URL and data about the favicon, but also the favicon itself, effectively combining the
cache()
andstoreAs()
functions. The purpose would be to avoid retrieving the icon over and over again every time it is used.I assume that many projects have good reasons NOT to do this, so I'm interested in your thoughts about adding an argument
$withContent
to thecache()
method.I can think of several ways to handle this, including:
content()
in thetoCache()
functionstoreAs
) and include the path to that file intoCache()
There are, of course, pros and cons or both methods, and there could be other options as well.
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions