--- parser3/src/classes/op.C 2005/08/30 08:23:09 1.157 +++ parser3/src/classes/op.C 2005/11/18 11:44:38 1.158 @@ -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/18 11:44:38 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -611,6 +611,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]