AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 15.07.2011, 00:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
sjakalax: SysGlobalCache extended
Источник: http://sjakalax.blogspot.com/2011/07...-extended.html
==============

hi,
I've had several occations where I was using the sysGlobalCache method for caching purposes.
Great class for caching or - combined with the info and application classes - exposing info throughout the whole application. Only ... the owner needs to be a string and once a value is added; all other values for that owner have to be of the same type. Sometimes I want to use an int as owner or store different types with the same owner.

So this would not be possible:
myGlobalCache.set('myowner', 'key1', 'value_x');
myGlobalCache.set('myowner', 'key2', 1234);
because 'value_x' is a string and 1234 is an integer value.

Same story for the code below:
myGlobalCache.set(myClass, 'key2', 'value_y');
Because the owner (myClass) in this case is not a string, but a custom class.

That's why I created an extended version of the sysGlobalCache object that can accepts different types for the values with the same owner and takes an optional parameter (default Types::String) for the owner type.

Haven't benchmarked it but I'd expect a slight performance penalty because of some extra logic.

You could even take it a step further and replace the sysGlobalCache in the info and/or application classes.
XPO containing the class can be downloaded here.

Enjoy!


Источник: http://sjakalax.blogspot.com/2011/07...-extended.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Kurt Hatlevik: Extended ATP (Available to Promise) Blog bot DAX Blogs 0 18.04.2011 23:11
emeadaxsupport: Kerberos Authentication Error Code: 0x7 KDC_ERR_S_PRINCIPAL_UNKNOWN Extended Error: 0xc0000035 KLIN(0) Blog bot DAX Blogs 0 09.11.2010 19:10
emeadaxsupport: Passing UtcDateTime values in extended query syntax Blog bot DAX Blogs 0 10.05.2010 21:05
AX UK: Extended Support for Microsoft Dynamics AX 3.0 Blog bot DAX Blogs 0 10.12.2008 20:05
Microsoft Dynamics CRM Team Blog: CRM Accelerators – Part VI – Extended Sales Forecasting Accelerator Blog bot Dynamics CRM: Blogs 0 18.09.2008 02:17

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 05:54.