flex 客户端缓存SharedObject

flex 客户端缓存SharedObject
强烈推介IDEA2021.1.3破解激活,IntelliJ IDEA 注册码,2021.1.3IDEA 激活码  

大家好,我是架构君,一个会写代码吟诗的架构师。今天说一说flex 客户端缓存SharedObject,希望能够帮助大家进步!!!

读取缓存:

usernameSO = SharedObject.getLocal('username');
                    if (usernameSO)
                    {
                        usernameSOAL = usernameSO.data['username'] as ArrayList;
                        if(usernameSOAL)
                        {
                            var u:Object=usernameSOAL.getItemAt(0);
                            username.text=u.username;
                        }
                    }

写入缓存:

var u:Object=new Object();
                    u.username=n;
                    var array:ArrayList=new ArrayList();
                    array.addItem(u);
                    usernameSO.data['username']=array;
                    usernameSO.flush();

 

转载于:https://www.cnblogs.com/tiandi/p/4736126.html

本文来源weixin_30595035,由架构君转载发布,观点不代表Java架构师必看的立场,转载请标明来源出处:https://javajgs.com/archives/29557

发表评论