@startuml
actor User
actor System
activate System
participant Souin
participant Memory
participant ReverseProxy
System -> ReverseProxy ++ : run()
System -> Souin ++ : main()
Souin -> Memory ++ : MemoryConnectionFactory()
Souin <-- Memory : AbstractProvider
... Waiting for user request ...
loop User requests
  User -> Souin : request
  activate User
  Souin -> Memory: GetRequestInCache()
  Souin <-- Memory: *Response
  alt the response from cache is not valid
    Souin -> ReverseProxy: GetRequestInReverseProxy()
    Souin <-- ReverseProxy: *Response
    alt the response from the reverse-proxy is cacheable
      Souin -> Memory: SetRequestInCache()
    end
  end
Souin -> User : response
deactivate User
end
@enduml
