Branch: Tag:

2003-04-23

2003-04-23 12:56:29 by Martin Stjernholm <mast@lysator.liu.se>

Fixed overcaching problem with RXML.Value.rxml_const_eval in cases
like this: &client.ip; <nocache>&client.ip;</nocache>

Rev: server/etc/modules/RXML.pmod/module.pmod:1.311

2:   //   // Created 1999-07-30 by Martin Stjernholm.   // - // $Id: module.pmod,v 1.310 2003/03/31 12:58:01 mast Exp $ + // $Id: module.pmod,v 1.311 2003/04/23 12:56:29 mast Exp $      // Kludge: Must use "RXML.refs" somewhere for the whole module to be   // loaded correctly.
1346:    //! implementor is free to ignore it.    {    mixed val = rxml_const_eval (ctx, var, scope_name); +  // We replace the variable object with the evaluated value when +  // rxml_const_eval is used. However, we hide +  // ctx->misc->recorded_changes so that the setting isn't cached. +  // That since rxml_const_eval should work for values that only are +  // constant in the current request. Note that we can still +  // overcache the returned result; it's up to the user to avoid +  // that with suitable cache tags. +  array rec_chgs = ctx->misc->recorded_changes; +  ctx->misc->recorded_changes = 0;    ctx->set_var(var, val, scope_name); -  +  ctx->misc->recorded_changes = rec_chgs;    return type ? type->encode (val) : val;    }   
8150:    return intro + ")" + OBJ_COUNT;    }    -  constant P_CODE_VERSION = 4.2; +  constant P_CODE_VERSION = 4.3;    // Version spec encoded with the p-code, so we can detect and reject    // incompatible p-code dumps even when the encoded format hasn't    // changed in an obvious way.