AXForum  
Go Back   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Forgotten Your Password?
Register Forum Rules FAQ Members List Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Old 06.08.2010, 17:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Join Date: 28.10.2006
Pawan's Ax blog: How To Cache A object Globally in Ax
Источник: http://pawansaxblog.blogspot.com/201...lly-in-ax.html
==============

There are three way to cache objects.

A global cache is an instance of class - SysGlobalCache, which is nothing but a Map containing Maps with a Key. These Maps contain the actual value and a key.
In Ax, we have three Global Cache Classes

1.Infolog.globalCache()

2.Appl.globalCache()

3. ClassFactory.GlobalCache().

How to use:

X++:
static void GlobalCacheSetAndGet(Args _args)
{
       SysGlobalCache globalCache;
       class          test;
       ;

      globalCache = infolog.globalCache();

     if (globalCache.isSet(classstr(test), 0))
     {
        test= globalCache.get(classstr(Test), 0);
        return test;
     }
    else
    {
        test= new test();
        globalCache.set(classstr(Test), 0, test);
        return test;
    }

}



Источник: http://pawansaxblog.blogspot.com/201...lly-in-ax.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Old 08.08.2010, 23:13   #2  
gl00mie is offline
gl00mie
Участник
MCBMSS
Most Valuable Professional
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
Лучший по профессии 2009
 
3,684 / 5813 (201) ++++++++++
Join Date: 28.11.2005
Location: Москва
Blog Entries: 3
И к чему это было написано? Во-первых, глобальных кэшей не три, а четыре, во-вторых, совершенно не раскрыта тема того, нафига их столько сделано.
 

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pawan's Ax blog: HOW To Do Debugging In AIF Blog bot DAX Blogs 0 01.07.2010 22:07
Pawan's Ax blog: How To Restore Data In AIFSchemaStore Table Blog bot DAX Blogs 0 01.07.2010 22:07
Pawan's Ax blog: How To Delete All Transaction Data In Ax Blog bot DAX Blogs 4 15.06.2010 11:23
Pawan's Ax blog: How to run AIF job Blog bot DAX Blogs 0 19.04.2010 11:05
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Рейтинг@Mail.ru
All times are GMT +3. The time now is 02:04.
Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Contacts E-mail, Advertising.