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; Repeat &I = &I + 1; If &RS(&I).IsChanged Then &RSLT = True; End-If; Until &RSLT or &RS.RowCount = &I; If &RSLT Then &CRS = GetRowsetCache(&RS); &CRS.Delete(); &CRS = CreateRowsetCache(&RS); &CRS.Save(); End-if;
PeopleSoft recommends that any standard operations used by your application, such as deleting and repopulating the rowset cache, be encapsulated in an application class.
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.