[development] Avoid running code block if process initiates on the server

George Dawson georgedwsn at gmail.com
Fri Dec 20 19:04:29 UTC 2013


Or, if you are using sessions, as you should be, you can place a flag in
the sessions array which must be "true" for users using this special
feature, and "false" for everyone else.

Of course, your users table must contain this information. You must
determine how it is to be administered.


On Fri, Dec 20, 2013 at 12:01 PM, John Fiala <jcfiala at gmail.com> wrote:

> Well, my first thought is to check for the user id - Boost is almost
> certainly crawling the site as an anonymous user, yeah?  And if we're
> talking about user-specific data, just have the process not run if the
> user_id == 0.
>
>
>
>
> On Thu, Dec 19, 2013 at 7:32 PM, Dayton Perkins <goodnewsdayton at gmail.com>wrote:
>
>>  I have a lot of data that I am loading into PHP buffer from a text file
>> cache. I recently added the Boost module. When the Boost crawler runs, I
>> have no need for this data as it is user-specific.
>> What server variable is available to determine whether the process is a
>> Web request or not? I would like to limit the resources that Boost uses
>> when crawling the site.
>> --
>>
>>
>>   *Kindest regards,* *Dayton Perkins* [image: Dayton Perkins]
>>
>> Good News Design
>>
>> Intelligent Web Programming for Business
>> Dayton Perkins: Recent American Expat in Hong Kong
>>    [image: dayton at goodnewsdesign.com] <dayton at goodnewsdesign.com>
>> dayton at goodnewsdesign.com   [image: Phone Me]  U.S Phone (rings me in
>> HK) 616-795-9039
>>
>>  http://goodnewsdesign.com
>> [image: GND Logo] <http://goodnewsdesign.com> <http://goodnewsdesign.com>
>>
>>
>>
>
>
> --
> John Fiala
> www.jcfiala.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20131220/992ad69f/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 3951 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20131220/992ad69f/attachment-0002.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 20888 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20131220/992ad69f/attachment-0003.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1083 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20131220/992ad69f/attachment-0002.jpe 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1098 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20131220/992ad69f/attachment-0003.jpe 


More information about the development mailing list