Jump to content

Is there a place where to put static data?


LAPS
 Share

Recommended Posts

Hi there,

I have an array-list of static email addresses that I would like to use throughout all the system e.g. in PW hooks and templates.

Is there a system-efficient place where to put its statement e.g. in a file that doesn't load each time a page is requested?

Link to comment
Share on other sites

17 hours ago, Zeka said:

You can use config.php if you preffer (API is not ready), but I would go with ready.php and setting().

I think @LAPS wants some place that does NOT load on every request. But all of your mentioned options do load on every request ? 

How large is that list of E-Mails? ? If that is really too much for every request you can put it

  • In some file that you only include() when you need it
  • In a non-autoload module, that you request when needed (eg $modules->get('myemails')->getAll())
  • In a WireCache object that is stored in the Database
  • In a dedicated page + field (eg $pages->get(1234)->emailslist)
  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...