Expand my Community achievements bar.

SOLVED

Is /etc an appropriate place to store custom data?

Avatar

Level 7

Hi,

In our project we have many sites on CQ. Each site might have some data associated with it, that is generated using a background job once a day.

The data is actually a pre-generated XML file that is later gonna be served when accessed via a URL. The reason why we pre-generate it rather than dynamically generate it in response to requests is that it is CPU heavy and could take quite a while to be generated.

For a site that its content is stored at /content/project/site I am thinking to create a similar hierarchy under /etc/project/site and store the file there.

The question is, is /etc a good place for storing such data?

Thanks in advance.        

1 Accepted Solution

Avatar

Correct answer by
Level 8

I agree that /etc is the appropriate place to store the data, one recommendation though to better fit usage patterns in /etc would be to add an additional path to allow better application of security and template use - so /etc/sitedata/project/site. This keeps the top level of /etc less cluttered and may make application of security or other pattern based rules simpler to apply and manager. 

View solution in original post

3 Replies

Avatar

Employee

Hi

Usually /etc is used for the design so /apps seems to be a better place for your needs.
 

There is an example of a basic structure here: http://docs.adobe.com/docs/en/aem/6-0/develop/the-basics/website.html.
See specifically Setting up the project structure and Setting up the Design.

Avatar

Correct answer by
Level 8

I agree that /etc is the appropriate place to store the data, one recommendation though to better fit usage patterns in /etc would be to add an additional path to allow better application of security and template use - so /etc/sitedata/project/site. This keeps the top level of /etc less cluttered and may make application of security or other pattern based rules simpler to apply and manager. 

Avatar

Level 1

On my opinion /apps is definitiv not the correct place. 

I would place it under /etc/project/site as LinearGradient wrote.

/apps is for code and not for content

But perhaps I'm wrong.