<commit_before>﻿using UnityEngine;
using System;
using System.Text;

namespace UniHttp
{
	internal sealed class CacheMetadata
	{
		internal const int version = 1;

		internal string domain;
		internal string path;
		internal string contentType;
		internal string eTag;
		internal DateTime? expireAt;
		internal DateTime? lastModified;

		internal CacheMetadata()
		{
		}

		internal CacheMetadata(HttpResponse response)<commit_msg>add fresh/stale properties to CacheMetadata<commit_after>﻿using UnityEngine;
using System;
using System.Text;

namespace UniHttp
{
	internal sealed class CacheMetadata
	{
		internal const int version = 1;

		internal string domain;
		internal string path;
		internal string contentType;
		internal string eTag;
		internal DateTime? expireAt;
		internal DateTime? lastModified;

		internal bool IsFresh
		{
			get { return expireAt > DateTime.Now; }
		}

		internal bool IsStale
		{
			get { return !IsFresh; }
		}

		internal CacheMetadata()
		{
		}

		internal CacheMetadata(HttpResponse response)
{'fraction_non_alphanumeric': 0.0641399416909621, 'fraction_numerical': 0.001943634596695821, 'mean_word_length': 4.282051282051282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3860976', 'n_tokens_mistral': 330, 'n_tokens_neox': 281, 'n_words': 96}