On Mon, 2005-05-23 at 16:15, 02MCMC43-mca-Yirdaw Gashaw wrote: > I use net_snmp_5.2.1, I have implemented a table using table iterator > method. But the cache is not working properly. I added > > netsnmp_inject_handler(reg, netsnmp_get_cache_handler(CACHE_TIMEOUT, > readData, storeData, table_oid, table_oid_len)) > > in "init_myModule" routine. But this does not have any effect as when I > tried snmpwalk, the get_*_data_point routines are called for every entry > of the table (for every GETNEXT request).
Yes - the get_*_data_point routines *will* be called for each request, working through some internal representation of the table. The caching routines are used to load (or release) this internal representation from some underlying subsystem. > My other problem is, I could not understand how a new row can be added to > the cache. A SET request (such as used to create a new row) would invalidate the cache, so it would then be re-loaded from the underlying system. It's up to the SET-handling code in the handler routine to update this underlying system with the new row. Dave ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
