|
|
|
Кеширование DW
|
|||
|---|---|---|---|
|
#18+
Народ, подскажите, задача следующая: При открытии окна редактирования записи постоянно вычитываются в DropDownDW, по сути одни и те же значения. Можно ли каким-то образом при первом открытии все необходимые мне данные вычитать куда-то а потом при повторном открытии использовать их. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.09.2005, 11:28 |
|
||
|
Кеширование DW
|
|||
|---|---|---|---|
|
#18+
Chistyakov VictorНарод, подскажите, задача следующая: При открытии окна редактирования записи постоянно вычитываются в DropDownDW, по сути одни и те же значения. Можно ли каким-то образом при первом открытии все необходимые мне данные вычитать куда-то а потом при повторном открытии использовать их. Вотэто видимо: PowerBuilder Help n_cst_dwcache Description Caching service. This object is designed to contain data used in multiple places within an application. It provides a single data source, eliminating redundant database retrievals. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.09.2005, 11:47 |
|
||
|
Кеширование DW
|
|||
|---|---|---|---|
|
#18+
n_cst_dwsrv_cache (inherited from n_cst_dwsrv) Description The DataWindow Cache service works with the global DWCache service to cache u_dw controls and child DataWindows. These services are best utilized in MDI applications where two or more u_dw controls could be instantiated and using identical DataWindow objects at the same time. Caching allows only one DataWindow object or datastore to be present in memory while two or more controls share the same object. It works by first scanning all objects on the DataWindow looking for drop down datwindow columns that have been designated for caching. If one is found, the child DataWindow is cached. Next, it looks at the u_dw control's tag value to see if it has been designated for caching and caches it. In both cases the objects are cached using the name provided by the programmer in the object's tag value. Because the DataWindow Cache service is subordinate to the global Cache service, the programmer can accomplish the same results with manual calls to the global service. See n_cst_DWCache for additional information. The global DWCache service actually manages the caching process and maintains an array of datastores, cache names, and retrieval arguments. The DataWindow service simply submits objects to it for caching. When a DataWindow object is passed to it, the DataWindow syntax is extracted and used to create a new datastore object. The datastore is then retrieved, using the designated retrieval arguments if any, and a ShareData issued back to the requesting control. If a cache already exists with the same name, a ShareData is issued. How To 1. Turn on the Cache service from your u_dw control. Typically, this is done in the Constructor event of the control via the method call of_SetCache ( TRUE ). 2. The of_DataObjectChanged method is called from the u_dw control's ue_DataObjectChanged event, which is triggered when a u_dw is instantiated or when the dataobject is changed dynamically during runtime. It ensures that the global cache service is instantiated and then calls the of_CacheObjects method, which scans the control for caching tag values and, if necessary, caches objects. Requirements You must supply a cache name for every control and/or child DataWindow being cached. Use the CacheName tag value to designate the name. For example, to cache a u_dw containing employee names you would place CacheName=Employee; in the u_dw control's tag value. Later, if you attempt to cache a u_dw control that uses the same cache name, the service sees that it has already been cached and subsequently performs a ShareData to it. NOTE: The developer is responsible to make sure the DataWindow buffers are the same. Options The Cache service can accommodate DataWindows that have retrieval arguments. However, you must supply valid retrieval arguments via tag value assignment. For example, if your DataWindow has defined retrieval arguments user_id and company_id, you would use the following tag value CacheArguments=ttucker,1001. When the object is cached, the retrieval arguments are stored in the global cache service and used when it is retrieved. Although all tag values are extracted as strings, the service is intelligent enough to parse the DataWindow syntax for the proper data types of the retrieval arguments and convert the tag value strings to their proper datatypes. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.09.2005, 15:10 |
|
||
|
|

start [/forum/topic.php?fid=15&msg=33251997&tid=1338160]: |
0ms |
get settings: |
8ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
25ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
36ms |
get tp. blocked users: |
1ms |
| others: | 219ms |
| total: | 321ms |

| 0 / 0 |
