--- parser3/src/classes/op.C 2005/08/30 08:23:09 1.157 +++ parser3/src/classes/op.C 2005/11/22 15:09:09 1.159 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_OP_C="$Date: 2005/08/30 08:23:09 $"; +static const char * const IDENT_OP_C="$Date: 2005/11/22 15:09:09 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -76,6 +76,7 @@ public: ULN("optimized-xml", XML|String::L_OPTIMIZE_BIT); ULN("html", HTML); ULN("optimized-html", HTML|String::L_OPTIMIZE_BIT); + ULN("regex", REGEX); #undef ULN } } untaint_lang_name2enum; @@ -611,6 +612,18 @@ static const String& as_file_spec(Reques return r.absolute(params.as_string(index, "filespec must be string")); } static void _cache(Request& r, MethodParams& params) { + if(params.count()==0) + { + // return current expiration time + Cache_scope* scope=static_cast(r.classes_conf.get(cache_data_name)); + if(!scope) + throw Exception("parser.runtime", + 0, + "expire-time get without cache"); + r.write_no_lang(*new VDate(scope->expires)); + return; + } + time_t now=time(0); // ^cache[filename] ^cache(seconds) ^cache[expires date]