# Expire in policy scripts

**URL:** <https://community.zeek.org/t/expire-in-policy-scripts/1783>\
**Category:** Development\
**Tags:** development\
**Created:** [January 13, 2011, 10:39pm UTC](https://community.zeek.org/t/expire-in-policy-scripts/1783 "2011-01-13T22:39:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregor\_Maier](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@Gregor\_Maier](https://community.zeek.org/u/Gregor_Maier)\
**Post date:** [January 13, 2011, 10:39pm UTC](https://community.zeek.org/t/expire-in-policy-scripts/1783/1 "2011-01-13T22:39:41Z")

</div>

Hi,

I have a question regarding expire in policy scripts:

If I use:  
&nbsp;&nbsp;global rpc\_calls: table[conn\_id] of table[count] of rpc\_call\_state  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&write\_expire = rpc\_timeout &expire\_func=expire\_rpc\_call;

will the expire timer be linked to the table that's indexed by conn\_id  
or the table that's indexed by count? Can I specify the table that  
should have an expire timer?

I want the timer linked to the table indexed by count.

thanks,  
gregor

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [January 14, 2011, 5:49am UTC](https://community.zeek.org/t/expire-in-policy-scripts/1783/2 "2011-01-14T05:49:17Z")

</div>

Iirc, it applies to the outer one. You can get the inner one by  
assigning the expire to a local and then inserting that into the  
outer table:

&nbsp;&nbsp;&nbsp;&nbsp;local inner: table[count] of rpc\_call\_state &write\_expire=rpc\_timeout;  
&nbsp;&nbsp;&nbsp;&nbsp;rpc\_call[cid] = inner;

Robin

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:39pm UTC](https://community.zeek.org/t/expire-in-policy-scripts/1783/3 "2022-05-06T15:39:24Z")

</div>


