However, the spaceFolder is a different instance from the underlying folder of the space object. So, folder metadata cached inside the underlying folder object of the space is stored again.
Therefore, I merged the two methods: newSpace() and storeSpaceFromTemplate() to avoid this problem.

Woonsan Ko
added a comment - 23/Mar/10 19:17 Fixed.
The cause of the problem was like this:
The SpaceServiceImpl#storeSpaceFromTemplate() method, which is now removed and merged into createSpace() method, did like this:
pageManager.deepCopyFolder(templateFolder, space.getPath(), space.getOwner());
spaceFolder = pageManager.getFolder(space.getPath());
storeSpace(space);
However, the spaceFolder is a different instance from the underlying folder of the space object. So, folder metadata cached inside the underlying folder object of the space is stored again.
Therefore, I merged the two methods: newSpace() and storeSpaceFromTemplate() to avoid this problem.