Ok, I added a "valid" flag into each extension table data structure (ie: one 
flag for each extension table).

Since all extension tables use the same cache as the Table1, then whenever data 
is requested from any of these extension tables then the 
Table1_container_load() routine will be called if the cache has expired.   As a 
result, I set the "valid" flag for each extension table to FALSE in the 
Table1_container_load() routine.  In the row_prep() routines of the extension 
tables, I check whether the "valid" flag is FALSE for that particular table. If 
FALSE, then I load new row data and set the flag to TRUE.

I think this is what you had in mind.  Seems like it works fine.   Thanks





Robert Story <[EMAIL PROTECTED]> wrote: On Wed, 13 Jun 2007 06:31:57 -0700 
(PDT) Need wrote:
NH> I was wondering whether the row_prep() routine should be utilizing the 
cache data in that the row_prep() routine should only be called once (for the 
particular row) within the 60 seconds until the cache times out.  This means 
that subsequent "snmpget" requests (for the particular row) will not result in 
the row_prep() routine being called. 
NH> 
NH> Perhaps the cache is just used for the overall table "container" and not 
utilized for specfic rows?

Exactly.. add a 'valid' flag to your data structure.. Or use a bit (or 8)  in
rowreq_flags:

        /*
         * flags per row. Currently, the first (lower) 8 bits are reserved
         * for the user. See mfd.h for other flags.
         */
        u_int           rowreq_flags;


 
---------------------------------
Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to