note 97551 added to function.apc-define-constants
| From: | webmaster at thedigitalorchard dot ca | Date: | Mon, 26 Apr 2010 01:06:42 +0000 |
| Subject: | note 97551 added to function.apc-define-constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168631@lists.php.net to get a copy of this message | ||
A second observation that I've made is that the nature of apc_define_constants() binding the
list of constants to a key and then requiring that key to load the constants is limiting.
Furthermore, there's no way to append additional constants to a given key.
A solution that I've been adopting is to build a list of constants to be defined, and then do
one of two things:
1) if APC is enabled, then use apc_define_constants();
2) ...else loop through the list and define each constant normally.
The problem I've run into is when this process happens at different places in a large
application, it can introduce overhead that otherwise wouldn't be there if it was possible to
append to an existing list of defined constants in APC.
----
Server IP: 72.55.140.6
Probable Submitter: 65.110.28.158
----
Manual Page -- http://www.php.net/manual/en/function.apc-define-constants.php
Edit -- https://master.php.net/note/edit/97551
Del: integrated -- https://master.php.net/note/delete/97551/integrated
Del: useless -- https://master.php.net/note/delete/97551/useless
Del: bad code -- https://master.php.net/note/delete/97551/bad+code
Del: spam -- https://master.php.net/note/delete/97551/spam
Del: non-english -- https://master.php.net/note/delete/97551/non-english
Del: in docs -- https://master.php.net/note/delete/97551/in+docs
Del: other reasons-- https://master.php.net/note/delete/97551
Reject -- https://master.php.net/note/reject/97551
Search -- https://master.php.net/manage/user-notes.php