*** __mac__ has quit IRC | 00:04 | |
*** hexsprite has joined #zope3-dev | 00:27 | |
*** afd____ has joined #zope3-dev | 00:29 | |
*** afd___ has quit IRC | 00:35 | |
*** malthe is now known as malthe|Zzz | 00:50 | |
*** harobed has quit IRC | 00:54 | |
*** afd____ has quit IRC | 01:32 | |
*** aaronv has quit IRC | 01:33 | |
*** nyo1 has quit IRC | 01:42 | |
*** natea has quit IRC | 02:11 | |
*** hazmat has quit IRC | 03:07 | |
*** andycat has joined #zope3-dev | 03:08 | |
*** hazmat has joined #zope3-dev | 03:35 | |
*** ChanServ sets mode: +o hazmat | 03:35 | |
*** aaronv has joined #zope3-dev | 03:59 | |
*** aaronv has quit IRC | 04:09 | |
*** yota has quit IRC | 05:12 | |
*** nyo1 has joined #zope3-dev | 05:34 | |
*** nyo1 has quit IRC | 05:50 | |
*** greenman has quit IRC | 06:06 | |
*** davisagli has quit IRC | 06:57 | |
*** davisagli has joined #zope3-dev | 06:58 | |
*** tarek_ has quit IRC | 07:01 | |
*** binseer has joined #zope3-dev | 07:03 | |
*** davisagli has quit IRC | 07:04 | |
*** davisagli has joined #zope3-dev | 07:05 | |
*** jayaraj has joined #zope3-dev | 07:06 | |
*** fairwinds has quit IRC | 07:13 | |
*** davisagli has left #zope3-dev | 07:30 | |
*** baijum has joined #zope3-dev | 07:49 | |
*** stub has joined #zope3-dev | 08:11 | |
*** greenman has joined #zope3-dev | 08:22 | |
*** greenman has quit IRC | 08:23 | |
*** harobed has joined #zope3-dev | 08:28 | |
*** agroszer has joined #zope3-dev | 08:44 | |
*** JaRoel|4D has quit IRC | 09:05 | |
*** olavgg has joined #zope3-dev | 09:12 | |
*** harobed has quit IRC | 09:12 | |
*** stub1 has joined #zope3-dev | 09:15 | |
*** stub has quit IRC | 09:15 | |
*** stub1 is now known as stub | 09:15 | |
*** afd____ has joined #zope3-dev | 09:25 | |
*** agroszer has quit IRC | 09:56 | |
*** pelle_ has joined #zope3-dev | 10:00 | |
*** harobed has joined #zope3-dev | 10:01 | |
*** JaRoel|4D has joined #zope3-dev | 10:02 | |
*** hipertracker has joined #zope3-dev | 10:12 | |
*** stub has quit IRC | 10:13 | |
*** mkerrin has joined #zope3-dev | 10:16 | |
*** jpcw has joined #zope3-dev | 10:27 | |
*** Theuni has joined #zope3-dev | 10:29 | |
*** Theuni1 has quit IRC | 10:29 | |
*** Theuni1 has joined #zope3-dev | 10:32 | |
*** Theuni has quit IRC | 10:32 | |
*** bigkevmcd has joined #zope3-dev | 10:37 | |
*** harobed has quit IRC | 10:38 | |
*** stub has joined #zope3-dev | 10:39 | |
*** regebro has joined #zope3-dev | 10:44 | |
*** greenman has joined #zope3-dev | 10:45 | |
*** JaRoel|4_ has joined #zope3-dev | 10:56 | |
*** olavgg has quit IRC | 10:57 | |
*** olavgg has joined #zope3-dev | 10:58 | |
*** MJ has joined #zope3-dev | 11:03 | |
*** afd____ has quit IRC | 11:04 | |
*** junkafarian has joined #zope3-dev | 11:07 | |
*** JaRoel|4D has quit IRC | 11:12 | |
*** harobed has joined #zope3-dev | 11:13 | |
*** goschtl has joined #zope3-dev | 11:24 | |
*** Theuni1 has quit IRC | 11:26 | |
*** Theuni has joined #zope3-dev | 11:26 | |
*** thekryz has joined #zope3-dev | 11:31 | |
*** thekryz has quit IRC | 11:36 | |
*** ktwilight__ has joined #zope3-dev | 11:41 | |
*** ktwilight__ has quit IRC | 11:44 | |
*** ktwilight__ has joined #zope3-dev | 11:44 | |
*** malthe|Zzz is now known as malthe | 11:44 | |
*** junkafarian has quit IRC | 11:45 | |
*** ktwilight__ is now known as ktwilight | 11:46 | |
*** pyqwer has joined #zope3-dev | 11:48 | |
*** afd__ has joined #zope3-dev | 11:49 | |
*** yotaff has joined #zope3-dev | 11:50 | |
*** reco has joined #zope3-dev | 11:50 | |
*** ktwilight_ has quit IRC | 11:57 | |
*** Rolando has joined #zope3-dev | 11:57 | |
*** junkafarian has joined #zope3-dev | 11:57 | |
*** JaRoel|4_ has quit IRC | 12:14 | |
*** JaRoel|4D has joined #zope3-dev | 12:20 | |
*** MJ has quit IRC | 12:29 | |
*** MJ has joined #zope3-dev | 12:30 | |
*** JaRoel|4D has quit IRC | 12:35 | |
*** stub has quit IRC | 12:50 | |
*** stub1 has joined #zope3-dev | 12:50 | |
*** stub1 is now known as stub | 12:51 | |
*** aaronv has joined #zope3-dev | 12:58 | |
*** JaRoel|4D has joined #zope3-dev | 13:03 | |
*** dunny has quit IRC | 13:10 | |
*** dunny has joined #zope3-dev | 13:11 | |
*** andycat has quit IRC | 13:16 | |
*** greenman has quit IRC | 13:18 | |
*** danfairs has joined #zope3-dev | 13:18 | |
*** andycat has joined #zope3-dev | 13:19 | |
*** MJ has quit IRC | 13:24 | |
*** dunny has quit IRC | 13:25 | |
*** MJ has joined #zope3-dev | 13:25 | |
*** iham|away has quit IRC | 13:29 | |
*** alga has joined #zope3-dev | 13:38 | |
*** tarek has joined #zope3-dev | 13:42 | |
*** JaRoel|4D has quit IRC | 13:43 | |
*** afd__ has quit IRC | 13:49 | |
*** danfairs has quit IRC | 13:49 | |
*** danfairs has joined #zope3-dev | 13:49 | |
*** tarek has quit IRC | 14:00 | |
*** JaRoel|4D has joined #zope3-dev | 14:29 | |
*** timte has joined #zope3-dev | 14:31 | |
*** baijum has quit IRC | 14:36 | |
*** tarek has joined #zope3-dev | 14:43 | |
*** fairwinds has joined #zope3-dev | 14:44 | |
*** stub has quit IRC | 14:45 | |
*** rocky has quit IRC | 14:46 | |
*** iham has joined #zope3-dev | 14:56 | |
*** reco has quit IRC | 15:04 | |
*** menesis has joined #zope3-dev | 15:08 | |
*** benji has joined #zope3-dev | 15:19 | |
*** reco has joined #zope3-dev | 15:19 | |
*** J1m has joined #zope3-dev | 15:51 | |
*** mgedmin has joined #zope3-dev | 15:56 | |
*** ignas has joined #zope3-dev | 15:58 | |
*** srichter has quit IRC | 16:00 | |
*** mgedmin has quit IRC | 16:01 | |
*** jamur2 has joined #zope3-dev | 16:02 | |
*** mgedmin has joined #zope3-dev | 16:07 | |
*** alga_ has joined #zope3-dev | 16:13 | |
*** menesis has quit IRC | 16:13 | |
*** alga has quit IRC | 16:13 | |
pyqwer | Hi, does anyone know if it's allowed to store a normal list into a session object (persistent session data container)? | 16:14 |
---|---|---|
pyqwer | I do something like this: mysession['mylist'].append('xyz'); mysession['mylist'].append('abc') | 16:15 |
*** lurkymclurkleton has joined #zope3-dev | 16:16 | |
pyqwer | An I have a page template that displays this list - what's weird is, that the second entry is not always displayed, if I hit the reload button. | 16:16 |
*** menesis_ has joined #zope3-dev | 16:16 | |
*** menesis_ has quit IRC | 16:18 | |
*** sp0cksbeard has joined #zope3-dev | 16:24 | |
*** srichter has joined #zope3-dev | 16:24 | |
*** LordOSipan has joined #zope3-dev | 16:24 | |
*** andycat has quit IRC | 16:26 | |
*** dunny has joined #zope3-dev | 16:26 | |
*** mgedmin_ has joined #zope3-dev | 16:29 | |
*** thekryz has joined #zope3-dev | 16:30 | |
*** mgedmin has quit IRC | 16:30 | |
thekryz | wow | 16:33 |
*** thekryz has quit IRC | 16:35 | |
*** lucielejard has joined #zope3-dev | 16:49 | |
*** goschtl has quit IRC | 16:49 | |
*** nyo1 has joined #zope3-dev | 16:56 | |
*** iham is now known as iham|away | 17:00 | |
*** Theuni has quit IRC | 17:00 | |
*** rocky has joined #zope3-dev | 17:01 | |
*** timte has quit IRC | 17:01 | |
*** Aiste has joined #zope3-dev | 17:04 | |
*** __mac__ has joined #zope3-dev | 17:06 | |
*** projekt01 has joined #zope3-dev | 17:06 | |
*** timte has joined #zope3-dev | 17:10 | |
*** jayaraj has quit IRC | 17:14 | |
*** binseer has quit IRC | 17:14 | |
*** __mac__ has quit IRC | 17:17 | |
*** srichter has quit IRC | 17:25 | |
*** rocky has quit IRC | 17:26 | |
*** rocky has joined #zope3-dev | 17:27 | |
*** srichter has joined #zope3-dev | 17:28 | |
*** nyo1 has quit IRC | 17:33 | |
*** MJ has quit IRC | 17:39 | |
*** nathany has joined #zope3-dev | 17:39 | |
*** mgedmin_ is now known as mgedmin | 17:56 | |
*** projekt01 has quit IRC | 18:00 | |
*** davisagli has joined #zope3-dev | 18:05 | |
*** Rolando has quit IRC | 18:23 | |
*** sp0cksbeard has quit IRC | 18:23 | |
*** hipertracker has quit IRC | 18:24 | |
*** harobed has quit IRC | 18:29 | |
*** rmarianski has joined #zope3-dev | 18:30 | |
*** davisagli has quit IRC | 18:38 | |
*** nyo1 has joined #zope3-dev | 18:49 | |
*** sunew has joined #zope3-dev | 18:49 | |
*** nyo1 has quit IRC | 18:59 | |
*** malthe is now known as malthe|away | 19:01 | |
mcdonc | pyqwer: you want to do instead | 19:06 |
mcdonc | L = mysession.get('mylist', []); L.append('xyz'); mysession['mylist'] = L | 19:07 |
mcdonc | e.g. make sure the session object's __setitem__ is called | 19:07 |
*** JaRoel|4D has quit IRC | 19:11 | |
pyqwer | mcdonc: Hmmm, but where's the difference to mysession.setdefault ? | 19:11 |
mcdonc | because with setdefault you mutate it after you set it | 19:12 |
mcdonc | you need to call __setitem__ after every mutation | 19:12 |
pyqwer | Ah, I see. | 19:12 |
mcdonc | (for nonpersistent mutable objects) | 19:12 |
pyqwer | And if I use PersistentList instead, I don't have this problem, right? | 19:12 |
mcdonc | right | 19:14 |
pyqwer | What I furthermore wonder is, that there's a difference between a normal page load and a page reload, any clue why that happens? | 19:14 |
mcdonc | page? | 19:14 |
pyqwer | (So, if you just enter the URL in the browser and press <enter>, in comparison to pressing the reload button) | 19:14 |
mcdonc | what about it? | 19:15 |
pyqwer | In my example, I did something like that: mysession['mylist'] = []; mysession['mylist'].append('A'), mysession['mylist'].append('B'), mysession['mylist'].append('C'). | 19:16 |
pyqwer | (Which is not allowed as __setitem__ is not called, I assume). | 19:16 |
pyqwer | Nevertheless, when I afterwards do a page load and display the list contents, it looks good. | 19:16 |
mcdonc | oh | 19:16 |
pyqwer | But when I press "Reload", it displays something like ['A'] or ['A','B'], but not ['A','B','C'] | 19:16 |
pyqwer | So I'm wondering where the difference between page load/reload is. | 19:17 |
mcdonc | right... well, it's not connected to page loads vs. reloads in any hard-and-fast way, but when you mutate a nonpersistent object, the changes will stick around for some period of time, until the object is "ghosted" (removed from memory)... when it's loaded back from the zodb again ("unghosted"), the changes will be gone | 19:17 |
mcdonc | zodb has an object cache | 19:18 |
mcdonc | and essentially what's happening is that your changes stick around while the object is still in the cache | 19:18 |
mcdonc | but disappear when it's evicted | 19:18 |
pyqwer | Ah, I see, so therefore I sometimes see these "ghost" data. | 19:18 |
mcdonc | how that's related to page loads, i dunno, but that's what's happening under the covers | 19:18 |
mcdonc | yeah | 19:18 |
*** sunew has quit IRC | 19:18 | |
*** mgedmin has quit IRC | 19:19 | |
pyqwer | Ok, that explains, why - when I restart the instance, only ['A'] is available. | 19:19 |
mcdonc | right... yeah, the changes are just in memory for some period of time, but they didnt get persisted | 19:19 |
*** mgedmin has joined #zope3-dev | 19:19 | |
pyqwer | I assume, the same thing applies to dictionaries, hence, PersistentDict should be used instead? | 19:19 |
mcdonc | pyqwer: i almost never use persistentlist or persistentdict personally (i just obey the rules of persistence "by hand") but that would be one thing to do | 19:20 |
*** tarek has quit IRC | 19:20 | |
pyqwer | mcdonc: Ok, many thinks, I got it, I think! | 19:21 |
mcdonc | pyqwer: good! | 19:21 |
*** davisagli has joined #zope3-dev | 19:21 | |
*** alga_ has quit IRC | 19:23 | |
*** tarek has joined #zope3-dev | 19:26 | |
*** tarek has quit IRC | 19:31 | |
*** sp0cksbeard has joined #zope3-dev | 19:39 | |
*** __mac__ has joined #zope3-dev | 19:44 | |
*** hazmat has quit IRC | 19:47 | |
*** yotaff has quit IRC | 19:48 | |
*** aaronv has quit IRC | 19:54 | |
*** JaRoel|4D has joined #zope3-dev | 19:55 | |
*** Theuni has joined #zope3-dev | 20:02 | |
*** danfairs has quit IRC | 20:17 | |
*** mkerrin has quit IRC | 20:22 | |
*** romanofski has joined #zope3-dev | 20:30 | |
*** afd__ has joined #zope3-dev | 20:40 | |
*** aaronv has joined #zope3-dev | 20:40 | |
*** yota has joined #zope3-dev | 20:50 | |
*** tarek has joined #zope3-dev | 20:54 | |
*** tarek has quit IRC | 21:17 | |
*** __mac__ has quit IRC | 21:22 | |
*** afd__ has quit IRC | 21:23 | |
*** tarek has joined #zope3-dev | 21:24 | |
*** __mac__ has joined #zope3-dev | 21:27 | |
*** philiKON has joined #zope3-dev | 21:30 | |
*** agroszer has joined #zope3-dev | 21:38 | |
*** danfairs has joined #zope3-dev | 21:42 | |
*** tarek has quit IRC | 21:43 | |
*** greenman has joined #zope3-dev | 21:43 | |
*** nyo1 has joined #zope3-dev | 21:43 | |
*** agroszer_ has joined #zope3-dev | 21:45 | |
*** junkafarian has quit IRC | 21:49 | |
*** regebro has quit IRC | 21:58 | |
*** greenman has quit IRC | 22:02 | |
*** thekryz has joined #zope3-dev | 22:02 | |
*** agroszer has quit IRC | 22:03 | |
*** rocky has quit IRC | 22:06 | |
*** rocky has joined #zope3-dev | 22:06 | |
*** g_n_o_s_i_s has joined #zope3-dev | 22:07 | |
*** LordOSipan has quit IRC | 22:16 | |
*** __mac__ has quit IRC | 22:17 | |
*** mgedmin has quit IRC | 22:21 | |
*** dbfrombrc has joined #zope3-dev | 22:22 | |
*** MrSipan has joined #zope3-dev | 22:28 | |
*** nyo1 has quit IRC | 22:31 | |
*** rocky has quit IRC | 22:33 | |
*** rocky1 has joined #zope3-dev | 22:34 | |
*** pelle__ has joined #zope3-dev | 22:34 | |
*** rocky1 is now known as rocky | 22:34 | |
*** ignas has quit IRC | 22:36 | |
*** g_n_o_s_i_s has left #zope3-dev | 22:42 | |
*** Theuni has quit IRC | 22:43 | |
*** agroszer_ has quit IRC | 22:45 | |
*** pelle_ has quit IRC | 22:51 | |
*** danfairs has quit IRC | 22:55 | |
*** junkafarian has joined #zope3-dev | 23:00 | |
*** agroszer has joined #zope3-dev | 23:00 | |
*** MJ has joined #zope3-dev | 23:00 | |
*** nyo1 has joined #zope3-dev | 23:04 | |
*** MJ has quit IRC | 23:08 | |
*** greenman has joined #zope3-dev | 23:10 | |
*** pyqwer has quit IRC | 23:12 | |
*** junkafarian has quit IRC | 23:25 | |
*** yota has quit IRC | 23:27 | |
*** dbfrombrc has quit IRC | 23:28 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!