Shopsys: Redis cache is not cleared after deploy with native installation

Created on 3 Sep 2018  路  4Comments  路  Source: shopsys/shopsys

What is happening

First of all SSFW doesn't have any command to clear Redis cache. Clearing of redis should be as part of phing target clean.

During the deploy, new release will be created next to the currently running release and new release need to work with a cache. If new release will read from current cache it may cause an error. I could still delete that cache but there is another problem when someone will accede to the currently running release and he will write to redis cache again.

Another problem will be if i will have two instances on same server (development and production instances).

Expected result

Redis cache should be cleared after deploy new release.
Redis key should have some prefix for every SSFW instance and unique ID for every build so application can easily clear old cache for his instance after deploy. Maybe unique ID would be generated after build container.

Bug

All 4 comments

Hi @henzigo and thanks for reporting those issues :slightly_smiling_face: Preferably, they should have been created as two separate issues though, as they can be addressed independently. Working with both of them as one bigger task may mean this issue will be resolved later, rather then sooner - would you mind moving the multiple instances problem into a new issue?

Clearing of redis cache as a part of the phing target clean makes sense but clearing the sessions - which are also stored in Redis - must be avoided.

Having two instances connected to the same Redis instance could be allowed by creating a new parameter redis_prefix, that could be randomly assigned during installation in a same way as the parameter secret.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ping (prevent stale)

This issue is solved in couple of phases, we already have

  • prefix for shop instance
  • clean redis cache phing target

and we still have to solve unique ID for deployment. Comments in this PR will help https://github.com/shopsys/shopsys/pull/736#discussion_r247842225
And I know that @henzigo have working solution, so we should discuss pre-implementation analysis with him.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boris-brtan picture boris-brtan  路  4Comments

rootpd picture rootpd  路  4Comments

grossmannmartin picture grossmannmartin  路  3Comments

boris-brtan picture boris-brtan  路  3Comments

henzigo picture henzigo  路  4Comments