SOC-3665 Slowness in getLastAccessedSpace

Fix description
* Replace query by calculating the last accessed spaces from the specified Identity
SOC-3693 Slowness in checking activities

Fix description:
* Use cache to store activities
* Calculate information of activity loading without query