Using the RowsetCache Class

The first time a user accesses a database, the rowset cache for that database is automatically created and populated. After that first user, all users and applications can take advantage of the rowset cache.

If the underlying data for a rowset cache changes, at the very least your application must delete the existing rowset cache. Your application can also delete, then recreate and repopulate the rowset cache if it changes the underlying data. For example:

Local Rowset &RS;
Local RowsetCache &CRS;
Local Boolean &RSLT = False;

   &I = &I + 1;
   If &RS(&I).IsChanged Then
      &RSLT = True;
Until &RSLT or
   &RS.RowCount = &I;

If &RSLT Then
   &CRS = GetRowsetCache(&RS);
   &CRS = CreateRowsetCache(&RS);

PeopleSoft recommends that any standard operations used by your application, such as deleting and repopulating the rowset cache, be encapsulated in an application class.

See Understanding Application Classes.

The RowsetCache contains a rowset, and serializes the contained rowset to binary form for speed. As with most PeopleTools objects, RowsetCache objects are cached to memory and file, but they are also cached to the data base.

RowsetCache objects are intended to be local to a data base : they should not be transferred to another data base.