Is /etc an appropriate place to store custom data? | Community
Skip to main content
LinearGradient
Level 6
October 16, 2015
Solved

Is /etc an appropriate place to store custom data?

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.        

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
PaulMcMahonAccepted solution
Level 8
October 16, 2015

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. 

3 replies

gcarlino
Employee
October 16, 2015

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.

Translate
PaulMcMahonAccepted solution
Level 8
October 16, 2015

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. 

Translate
stejan74
New Participant
October 16, 2015

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.

Translate