Reputation: 2413
In my company, we build most of our projects using composer, which means a lot of repeated packages (same library with same version) getting downloaded from the internet across my different teams.
I have tried Satis Composer Server,but the problem is the cache is not generated on demand.
I want to implement a central caching service which can help implement runtime caching or on demand cache.
Is it possible to implement?
Upvotes: 5
Views: 2774
Reputation: 71
I've developed a solution for this exact problem, called Velocita:
https://github.com/gmta/velocita-proxy
Works together with a Composer plugin. It improves reliability and performance of Composer installs and you can configure which locations you want to mirror.
Satis is still great for local repositories or proactively generated caches based on composer.json
contents, but Velocita allows for a more dynamic pull-through cache.
Upvotes: 4
Reputation: 10144
Today, Github faced a short outage and that made me look into your question. I've got multiple webservers and I'd like to setup one of them as a git proxy server. There is no need for a webserver to look download from Github (or Bitbucket, Gitlab, etc.) if it can download the same package from the internal network.
I found this blog post, explaining two (not actively maintained) options:
https://github.com/sitaramc/gitpod
local caching server for git when the actual server is on the other side of a (possibly slow) WAN link
https://github.com/researchgate/broker
A full proxy for composer repositories
Upvotes: 1