Can I disable the cache in DBIx::Searchbuilder?

I’ve run into an odd problem…

This is on FreeBSD 4.8; RT 3.04, DBIx::Searchbuilder 0.88.

I’m trying to import tickets from another system. I’ve whacked up a
script that is starting to work… I am able to Create() tickets with
(most of) the desired attributes from the old system. The strangeness
is that if I run my script at full speed (either inside the perl
debugger or normally), it fails. When I single step through it,
(actually, I “continue” in stages), it works.

During my development/debugging I’ve seen the same sort of failures (at
the same place) but with different stack traces.

When it fails, this is the trace:

[Fri Aug 8 17:37:47 2003] [crit]: Use of uninitialized value in
subtraction (-) at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Record/Cachable.
pm line 96.

DBIx::SearchBuilder::Record::Cachable::LoadByCols(‘RT::Ticket=HASH(0x8eb
0c24)’,‘id’,6144) called at /space/rt3/lib//RT/Record.pm line 222

    RT::Record::LoadByCols('RT::Ticket=HASH(0x8eb0c24)','id',6144)

called at
/usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Record.pm line
811

DBIx::SearchBuilder::Record::LoadById(‘RT::Ticket=HASH(0x8eb0c24)’,6144)
called at /space/rt3/lib//RT/Ticket_Overlay.pm line 212

    RT::Ticket::Load('RT::Ticket=HASH(0x8eb0c24)',6144) called at

/space/rt3/lib//RT/Transaction_Overlay.pm line 118

RT::Transaction::Create(‘RT::Transaction=HASH(0x8e8cec4)’,‘Ticket’,6144,
‘TimeTaken’,0,‘Type’,‘Create’,‘Data’,‘undef’,…) called at
/space/rt3/lib//RT/Ticket_Overlay.pm line 3780

RT::ticket::_NewTransaction(‘RT::Ticket=HASH(0x8d10c78)’,‘Type’,‘Create’
,‘TimeTaken’,0,‘MIMEObj’,‘undef’) called at
/space/rt3/lib//RT/Ticket_Overlay.pm line 615

RT::ticket::Create(‘RT::Ticket=HASH(0x8d10c78)’,‘Requestor’,‘ARRAY(0x8cd
5a1c)’,‘Subject’,‘linux login environment
please’,‘Status’,‘open’,‘FinalPriority’,99,…) called at
./import-itrack line 295

    main::bug_to_ticket('HASH(0x8e6f060)') called at ./import-itrack

line 176

(/space/rt3/lib//RT.pm:242)

This is the line that is complaining:

## Decide if the cache object is too old

if ((time() - $cache_time) <=

$this->{’_CacheConfig’}{‘cache_for_sec’}) {

            $this->_fetch($cache_key); 

            return (1, "Fetched from cache");

So apparently $cache_time is not set…

How do I go about debugging this? If it is easy, I’d like to just
completely disable the cache concept till I get the rest of my
code/process more stable…

Is this something that anyone has seen?

I’ve run into an odd problem…

This is on FreeBSD 4.8; RT 3.04, DBIx::Searchbuilder 0.88.

I’m trying to import tickets from another system. I’ve whacked up a
script that is starting to work… I am able to Create() tickets with
(most of) the desired attributes from the old system. The strangeness
is that if I run my script at full speed (either inside the perl
debugger or normally), it fails. When I single step through it,
(actually, I “continue” in stages), it works.

Yes. see the rt2-to-rt3 toolset. It turns off the cache for importing.

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.