Closed dusta closed 1 year ago
Hello curious contributor ! Since it seems to be your first contribution, make sure that you've been:
Hello @dusta !
This is very interesting and I'll look into it for the next major (v10) or maybe minor release (v9.2).
Do you know if there any existing PHP SDK/Connector for Cloudflare Reserve Cache ?
Also I think will need to ask a "free" account to Cloudflare to make the initial development.
Thank for the suggestion !
@Geolim4 It's compatible with S3. Other problem is that you need to folow what files you have on server. To not spam Object Storage you need to use database to have information what files you alredy have and when should be updated.
Time ago I have wrote similar code for files S3 you can check here. https://github.com/dframe/fileStorage
I could even update the code to be compatibility as driver with phpfastcache but you would have to tell me if there is anything to get the tmp file cache
/**
* @param $adapter
* @param $tmpName
* @param $filePath
* @param bool $forcedUpdate
*
* @return array
*/
$Storage->put('s3', $tmpName, $filePath);
Ohh okay, Phpfastcache is already supporting Firebase ATM, but S3 is some serious and complex architecture that I'm not a specialist at all. The level of abstraction required for Phpfastcache is high and to be honest at this moment I have no time to work on a new connector, especially a complex one like S3 :(
But if you want to implement it by yourself for your needs, Phpfastcache is extensible: https://github.com/PHPSocialNetwork/phpfastcache/wiki/%5BV5%CB%96%5D-Extending-phpFastCache
Thank you. I'll try to work on it.
Hello, I'm closing this PR for now, If you need support again, ask to reopen it.
Cheers
What type of feature would you like?
Other (Please Specify)
The feature request
Cloudflare started implement Reserve Cache.
It would be a completely new type of drivers named "Object Storage Driver" You generate cache and send to R2/S3 and proxy server take this file cache
https://developers.cloudflare.com/cache/about/cache-reserve/ https://blog.cloudflare.com/r2-open-beta/
Code sample (optional)
No response
References (optional)
No response
Do you have anything more you want to share? (optional)
No response