as a dependency • PHP stack as a dependency • git clone [email protected]:cakephp/cakefest2021.git • cd cakefest2021 • docker-compose up • ./dk.sh • Use ./initdb.sh from host to restore a dbdump 5
Check again your queries and 3rd party services, then continue with this list • Remove filesystem access • Logs • Session • Cache engines • Do not use sessions if they are not needed • Ensure your assets are optimized • Consider a cache layer... 20
the benefits are not clear, reconsider the cache layer • Be careful with hidden keys • Users::view cache • Users belongsToMany Groups • Naive invalidation strategy: ANY change done to Users, Groups, GroupsUsers, invalidate all • More complex strategy • Change in users > invalidate by key • Change in groups > invalidate all related users by key 21
all the things • Middleware based Full Cache example • Consider using varnish or similar alternatives instead • It could make sense when invalidation is time based 26