Closed
Bug 342114
Opened 19 years ago
Closed 19 years ago
Bugzilla.pm caches data in global variables
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file, 2 obsolete files)
6.00 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Right now Bugzilla.pm stores a lot of data in variables like "my $_cgi" and "my $_dbh". Under mod_perl, this will fail miserably.
Basically, what we need is a way to cache something just for the current request.
Since Bugzilla has to work in mod_perl and outside of mod_perl, we need a way to do this both inside of mod_perl and outside of mod_perl.
Basically, I'm thinking that we'll have a request_cache() function inside of Bugzilla.pm, that will return the correct type of per-request cache depending on whether we're in mod_perl or not.
Assignee | ||
Comment 1•19 years ago
|
||
Okay, here it is. Basically, at this point this consolidates all of the global variables into *one* global variable.
Why does this matter, you ask?
Basically, now, when mod_perl support hits, we can just add mod_perl support to Bugzilla->request_cache, and it will use some clever mod_perl stuff instead of the "our $_request_cache" that's in Bugzilla.pm.
We can't actually write that code yet since we don't actually have mod_perl support yet, and I think it'd be pretty silly to try to work these things out before I even have a single page working under mod_perl.
Attachment #226293 -
Flags: review?(LpSolit)
Assignee | ||
Comment 2•19 years ago
|
||
Okay, this version actually works under mod_perl.
Attachment #226293 -
Attachment is obsolete: true
Attachment #226450 -
Flags: review?(LpSolit)
Attachment #226293 -
Flags: review?(LpSolit)
Assignee | ||
Comment 3•19 years ago
|
||
I had left my die_with_dignity code in the previous patch.
Attachment #226450 -
Attachment is obsolete: true
Attachment #226451 -
Flags: review?
Attachment #226450 -
Flags: review?(LpSolit)
Assignee | ||
Updated•19 years ago
|
Attachment #226451 -
Flags: review? → review?(LpSolit)
![]() |
||
Comment 4•19 years ago
|
||
Comment on attachment 226451 [details] [diff] [review]
v2.1
> sub _cleanup {
>
>+ undef $_request_cache;
> }
It's intentional that you only do it for $_request_cache, i.e when not using mod_perl, right? I cannot test the mod_perl part of the patch, but what I see matches what the docs say. so r=LpSolit
Attachment #226451 -
Flags: review?(LpSolit) → review+
![]() |
||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Flags: approval?
Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #4)
> It's intentional that you only do it for $_request_cache, i.e when not using
> mod_perl, right?
Right. The END block won't get run correctly under mod_perl anyway, because it lives in a module (as I understand it). And the request object is automatically destroyed at the end of every request, meaning that all our variables are automatically cleaned up there.
Updated•19 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 6•19 years ago
|
||
Checking in Bugzilla.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v <-- Bugzilla.pm
new revision: 1.38; previous revision: 1.37
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•18 years ago
|
||
The correct bug number for those release notes is actually bug 349423.
You need to log in
before you can comment on or make changes to this bug.
Description
•