Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-40894

encodeLocalCacheKey not working correct with sharding

    Details

      Description

      I am using Liferay 6.1 GA3 and I have an issue with cache and sharding. I have noticed that in method encodeLocalCacheKey ShardUtil.getCurrentShardName() always gets the same shard name (default). And because I have the same id-s for some layouts in each shard it generates the same key. Because I have two portal instances when I go to the first one date is cached with a key (with shard name default, this is not correct). When I go to the second portal instance data is loaded from cache but because the key is wrong it will get the data loaded from instance one.

      I experience this issue when I want to access the page for the first time. It is not code made by me to control how currentShard is set.

      More details regarding this:
      https://www.liferay.com/community/forums/-/message_boards/view_message/30090382#_19_message_30088002

        Attachments

          Activity

            People

            Assignee:
            michael.saechang Michael Saechang
            Reporter:
            cristianpetrula Cristian Petrula (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 1 week, 3 days ago

                Packages

                Version Package